JSPM

  • Created
  • Published
  • Downloads 57
  • Score
    100M100P100Q65814F
  • License MIT

A modern, accessible, and customizable React UI component library built with TypeScript and Tailwind CSS. Create beautiful, consistent user interfaces with ease.

Package Exports

  • its-just-ui
  • its-just-ui/dist/styles.css
  • its-just-ui/styles
  • its-just-ui/styles.css

Readme

its-just-ui - Modern React Component Library

A comprehensive, accessible, and customizable React UI component library built with TypeScript and Tailwind CSS. Create beautiful, consistent user interfaces with 28+ production-ready components.

🚀 Build faster with production-ready React components
Lightweight and tree-shakeable with zero runtime dependencies
🎨 Fully customizable with Tailwind CSS and CSS variables
Accessible by default following WAI-ARIA best practices
📱 Responsive with mobile-first design approach
🔧 TypeScript ready with complete type definitions

npm version License: MIT TypeScript Bundle Size npm downloads

Table of Contents

Features

Why Choose its-just-ui?

  • 🎨 28 Production-Ready Components - Comprehensive UI component library for React applications
  • 🔧 Full TypeScript Support - Built with TypeScript for complete type safety and excellent developer experience
  • 📱 Responsive Design - Mobile-first approach with adaptive layouts that work on all devices
  • Accessibility First - WAI-ARIA compliant components with full keyboard navigation support
  • 🎯 Tree-shakeable - Import only what you need for optimal bundle size and performance
  • 🌗 Dark Mode Ready - Built-in theming system with CSS variables for easy customization
  • Zero Dependencies - Lightweight library with no external runtime dependencies
  • 🎛️ Highly Customizable - Extensive styling props and theme support for complete control
  • 📚 Storybook Documentation - Interactive component explorer with live examples
  • 🔄 Form Integration Ready - Works seamlessly with popular form libraries
  • 🎭 Animation Support - Smooth transitions and animations built-in
  • 🧩 Compound Components - Flexible component architecture for complex use cases

Quick Start

Get up and running with its-just-ui in minutes:

Installation

# Using npm
npm install its-just-ui

# Using yarn
yarn add its-just-ui

# Using pnpm
pnpm add its-just-ui

Basic Setup

  1. Import the required CSS in your app's entry point:
// main.tsx or App.tsx
import 'its-just-ui/dist/styles.css'

Important: The CSS import is required for proper styling. Without it, components will not be styled correctly.

  1. Start using components in your React application:
import { Button, Card, Input, Checkbox, Progress } from 'its-just-ui'

function App() {
  return (
    <Card className="p-6 max-w-md mx-auto">
      <h2 className="text-2xl font-bold mb-4">Welcome to its-just-ui</h2>
      <Input placeholder="Enter your name" label="Name" className="mb-4" />
      <Checkbox label="I agree to the terms and conditions" className="mb-4" />
      <Progress value={75} className="mb-4" />
      <Button variant="primary" className="w-full">
        Get Started
      </Button>
    </Card>
  )
}

Component Library

Our comprehensive component library is organized into logical categories for easy discovery and use.

Component Statistics

  • Total Components: 28
  • Core Components: 6
  • Navigation Components: 4
  • Form Components: 7
  • Data Display Components: 5
  • Feedback Components: 3
  • Layout Components: 3

Core Components

Essential building blocks for any React application.

Button

Interactive button component with multiple variants, sizes, and states.

import { Button } from 'its-just-ui'

// Variants
<Button variant="primary">Primary Button</Button>
<Button variant="secondary">Secondary Button</Button>
<Button variant="outline">Outline Button</Button>
<Button variant="ghost">Ghost Button</Button>
<Button variant="destructive">Destructive Button</Button>
<Button variant="link">Link Button</Button>

// Sizes
<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>

// States
<Button loading>Loading...</Button>
<Button disabled>Disabled</Button>
<Button fullWidth>Full Width</Button>

// With Icons
<Button icon={<SearchIcon />}>Search</Button>
<Button rightIcon={<ArrowRightIcon />}>Next</Button>

Props:

  • variant: 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link'
  • size: 'sm' | 'md' | 'lg'
  • loading: boolean
  • disabled: boolean
  • fullWidth: boolean
  • icon: ReactNode
  • rightIcon: ReactNode

Card

Flexible container component for grouping related content.

import { Card } from 'its-just-ui'

;<Card variant="elevated" selectable>
  <Card.Header>
    <Card.Title>Card Title</Card.Title>
    <Card.Description>Card description goes here</Card.Description>
  </Card.Header>
  <Card.Body>
    <p>Main content of the card</p>
  </Card.Body>
  <Card.Footer>
    <Button size="sm">Action</Button>
  </Card.Footer>
</Card>

Features:

  • Compound component architecture
  • Selection states
  • Expandable content
  • Badge support
  • Custom styling
  • Hover effects

Input

Versatile text input field with comprehensive features.

import { Input } from 'its-just-ui'

// Basic input
<Input placeholder="Enter text" />

// With label and helper text
<Input
  label="Email"
  type="email"
  placeholder="you@example.com"
  helperText="We'll never share your email"
/>

// With validation
<Input
  label="Password"
  type="password"
  required
  error
  errorMessage="Password must be at least 8 characters"
/>

// With icons
<Input
  placeholder="Search..."
  leftIcon={<SearchIcon />}
  rightIcon={<ClearIcon />}
/>

Features:

  • Multiple input types
  • Validation states
  • Helper text
  • Error messages
  • Icons
  • Controlled/uncontrolled
  • Accessibility support

Checkbox

Advanced checkbox component with tri-state support and group management.

import { Checkbox } from 'its-just-ui'

// Basic checkbox
<Checkbox label="Accept terms" />

// Tri-state checkbox
<Checkbox
  indeterminate={true}
  label="Select all"
/>

// Checkbox group
<Checkbox.Group label="Select options">
  <Checkbox.SelectAll />
  <Checkbox.Item value="option1" label="Option 1" />
  <Checkbox.Item value="option2" label="Option 2" />
  <Checkbox.Item value="option3" label="Option 3" />
</Checkbox.Group>

// Custom styling
<Checkbox
  variant="filled"
  size="lg"
  checkedBackgroundColor="#10b981"
  label="Custom styled"
/>

Key Features:

  • 7 visual variants
  • Tri-state logic
  • Group management
  • Select all functionality
  • Status indicators
  • Loading states
  • 40+ style props

Progress

Versatile progress indicator with multiple variants and features.

import { Progress } from 'its-just-ui'

// Basic progress
<Progress value={65} />

// Circular progress
<Progress variant="circular" value={75} size="lg" />

// Multi-segment progress
<Progress
  segments={[
    { id: '1', value: 30, color: '#10b981' },
    { id: '2', value: 25, color: '#3b82f6' },
    { id: '3', value: 20, color: '#f59e0b' }
  ]}
/>

// Indeterminate
<Progress isIndeterminate />

// With compound components
<Progress value={75}>
  <Progress.Track />
  <Progress.Bar />
  <Progress.Label>Upload Progress</Progress.Label>
  <Progress.ValueDescription>75% Complete</Progress.ValueDescription>
</Progress>

Variants: linear, circular, dashed, striped, segmented, pill, bordered, minimal

Slider

Flexible range input with marks and labels.

import { Slider } from 'its-just-ui'

// Basic slider
<Slider
  value={[50]}
  onValueChange={setValue}
  min={0}
  max={100}
/>

// Range slider
<Slider
  value={[25, 75]}
  onValueChange={setRange}
/>

// With marks
<Slider
  value={[50]}
  marks={[
    { value: 0, label: '0%' },
    { value: 50, label: '50%' },
    { value: 100, label: '100%' }
  ]}
/>

Features:

  • Single/range values
  • Custom marks
  • Labels
  • Keyboard navigation
  • Touch support
  • Vertical orientation

Components for building intuitive navigation experiences.

Anchor

Advanced navigation component with scroll spy and smooth scrolling.

import { Anchor } from 'its-just-ui'

// Basic navigation
<Anchor targetIds={['intro', 'features', 'pricing']}>
  <Anchor.Link href="#intro">Introduction</Anchor.Link>
  <Anchor.Link href="#features">Features</Anchor.Link>
  <Anchor.Link href="#pricing">Pricing</Anchor.Link>
</Anchor>

// With groups and indicator
<Anchor variant="side-border" scrollSpy hashSync>
  <Anchor.Indicator />
  <Anchor.Group title="Getting Started">
    <Anchor.Link href="#intro">Introduction</Anchor.Link>
    <Anchor.Link href="#install">Installation</Anchor.Link>
  </Anchor.Group>
  <Anchor.Group title="Components">
    <Anchor.Link href="#button">Button</Anchor.Link>
    <Anchor.Link href="#input">Input</Anchor.Link>
  </Anchor.Group>
</Anchor>

Key Features:

  • 7 visual variants
  • Auto scroll spy
  • Smooth scrolling
  • Hash synchronization
  • Active indicators
  • Nested groups
  • Keyboard navigation

Navigation hierarchy indicator.

import { Breadcrumb } from 'its-just-ui'

;<Breadcrumb>
  <Breadcrumb.Item>
    <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
  </Breadcrumb.Item>
  <Breadcrumb.Separator />
  <Breadcrumb.Item>
    <Breadcrumb.Link href="/products">Products</Breadcrumb.Link>
  </Breadcrumb.Item>
  <Breadcrumb.Separator />
  <Breadcrumb.Item isCurrentPage>
    <Breadcrumb.Link>Current Product</Breadcrumb.Link>
  </Breadcrumb.Item>
</Breadcrumb>

Pagination

Navigate through pages of content.

import { Pagination } from 'its-just-ui'

;<Pagination
  currentPage={currentPage}
  totalPages={100}
  onPageChange={setCurrentPage}
  showPageNumbers
  showPageSizeSelector
  pageSizeOptions={[10, 20, 50, 100]}
/>

ToggleButtons

Group of toggle buttons for multi-selection.

import { ToggleButtons } from 'its-just-ui'

;<ToggleButtons value={['bold']} onValueChange={setFormats}>
  <ToggleButtons.Item value="bold">B</ToggleButtons.Item>
  <ToggleButtons.Item value="italic">I</ToggleButtons.Item>
  <ToggleButtons.Item value="underline">U</ToggleButtons.Item>
</ToggleButtons>

Form Components

Comprehensive form controls for user input.

Select

Advanced dropdown with search and multi-select.

import { Select } from 'its-just-ui'

// Basic select
<Select
  options={options}
  placeholder="Select option"
  onChange={setSelected}
/>

// Multi-select with search
<Select
  options={options}
  multiple
  searchable
  clearable
  placeholder="Select multiple"
/>

// Grouped options
<Select
  options={groupedOptions}
  grouped
  renderGroup={(group) => <div className="font-bold">{group.label}</div>}
/>

Autocomplete

Text input with suggestions and async loading.

import { Autocomplete } from 'its-just-ui'

;<Autocomplete
  options={options}
  searchable
  async
  onSearch={handleSearch}
  onSelect={handleSelect}
  placeholder="Search..."
/>

RadioGroup

Single selection from multiple options.

import { RadioGroup } from 'its-just-ui'

;<RadioGroup value={value} onChange={setValue}>
  <RadioGroup.Item value="1" label="Option 1" />
  <RadioGroup.Item value="2" label="Option 2" />
  <RadioGroup.Item value="3" label="Option 3" />
</RadioGroup>

Switch

Toggle switch for boolean states.

import { Switch } from 'its-just-ui'

;<Switch checked={enabled} onCheckedChange={setEnabled} label="Enable notifications" size="lg" />

Rating

Star rating input component.

import { Rating } from 'its-just-ui'

;<Rating value={rating} onChange={setRating} precision={0.5} size="lg" showValue />

Cascade

Hierarchical selection component.

import { Cascade } from 'its-just-ui'

;<Cascade
  options={locationOptions}
  placeholder="Select location"
  onChange={setLocation}
  searchable
  showPath
/>

Data Display Components

Components for presenting data effectively.

Table

Feature-rich data table component.

import { Table } from 'its-just-ui'

;<Table
  data={users}
  columns={columns}
  variant="striped"
  selectionMode="multiple"
  enableSorting
  enableFiltering
  enablePagination
/>

Features:

  • Sorting
  • Filtering
  • Pagination
  • Selection
  • Expandable rows
  • Cell editing
  • Virtualization

List

Structured list display.

import { List } from 'its-just-ui'

;<List selectable>
  <List.Item>
    <List.ItemIcon>
      <UserIcon />
    </List.ItemIcon>
    <List.ItemText primary="John Doe" secondary="john@example.com" />
  </List.Item>
</List>

Badge

Status indicators and labels.

import { Badge } from 'its-just-ui'

<Badge variant="success">Active</Badge>
<Badge variant="warning" closable>Pending</Badge>
<Badge variant="error" rounded>Failed</Badge>

Avatar

User profile pictures with fallbacks.

import { Avatar } from 'its-just-ui'

;<Avatar src="/user.jpg" alt="John Doe" size="lg" status="online" fallback="JD" />

Chip

Compact elements for tags and filters.

import { Chip } from 'its-just-ui'

;<Chip variant="primary" closable onClose={handleClose}>
  React
</Chip>

Feedback Components

Components for user feedback and notifications.

Alert

Important messages and notifications.

import { Alert } from 'its-just-ui'

;<Alert variant="success" dismissible>
  <Alert.Title>Success!</Alert.Title>
  <Alert.Description>Your changes have been saved.</Alert.Description>
</Alert>

Skeleton

Loading placeholders.

import { Skeleton } from 'its-just-ui'

<Skeleton variant="text" lines={3} />
<Skeleton variant="rectangular" width="100%" height="200px" />
<Skeleton variant="circular" width="40px" height="40px" />

Tooltip

Contextual information on hover.

import { Tooltip } from 'its-just-ui'

;<Tooltip content="Helpful information" placement="top">
  <Button>Hover me</Button>
</Tooltip>

Layout Components

Components for page structure and layout.

Accordion

Collapsible content panels.

import { Accordion } from 'its-just-ui'

;<Accordion type="single" collapsible>
  <Accordion.Item value="1">
    <Accordion.Trigger>Question 1</Accordion.Trigger>
    <Accordion.Content>Answer 1</Accordion.Content>
  </Accordion.Item>
</Accordion>

Dialog

Modal dialogs for important interactions.

import { Dialog } from 'its-just-ui'

;<Dialog>
  <Dialog.Trigger asChild>
    <Button>Open Dialog</Button>
  </Dialog.Trigger>
  <Dialog.Content>
    <Dialog.Header>
      <Dialog.Title>Confirm Action</Dialog.Title>
      <Dialog.Description>Are you sure you want to continue?</Dialog.Description>
    </Dialog.Header>
  </Dialog.Content>
</Dialog>

Drawer

Side panel overlays.

import { Drawer } from 'its-just-ui'

;<Drawer>
  <Drawer.Trigger asChild>
    <Button>Open Drawer</Button>
  </Drawer.Trigger>
  <Drawer.Content position="right" size="md">
    <Drawer.Header>
      <Drawer.Title>Settings</Drawer.Title>
    </Drawer.Header>
  </Drawer.Content>
</Drawer>

Stepper

Step-by-step process indicator.

import { Stepper } from 'its-just-ui'

;<Stepper activeStep={1} orientation="horizontal">
  <Stepper.Step label="Account" description="Create account" />
  <Stepper.Step label="Profile" description="Setup profile" />
  <Stepper.Step label="Complete" description="Finish setup" />
</Stepper>

Splitter

Resizable split layouts.

import { Splitter } from 'its-just-ui'

;<Splitter direction="horizontal" initialSizes={[30, 70]}>
  <Splitter.Pane index={0}>Left Panel</Splitter.Pane>
  <Splitter.Handle index={0} />
  <Splitter.Pane index={1}>Right Panel</Splitter.Pane>
</Splitter>

Popover

Floating content overlay.

import { Popover } from 'its-just-ui'

;<Popover trigger="hover">
  <Popover.Trigger>Hover for info</Popover.Trigger>
  <Popover.Content>
    <Popover.Arrow />
    <Popover.Title>Information</Popover.Title>
    <Popover.Description>Additional details appear here.</Popover.Description>
  </Popover.Content>
</Popover>

Theming & Customization

CSS Variables

Customize the entire design system using CSS variables:

:root {
  /* Brand Colors */
  --just-ui-primary: 59 130 246;
  --just-ui-secondary: 100 116 139;
  --just-ui-success: 34 197 94;
  --just-ui-warning: 251 146 60;
  --just-ui-error: 239 68 68;
  --just-ui-info: 59 130 246;

  /* Gray Scale */
  --just-ui-gray-50: 249 250 251;
  --just-ui-gray-100: 243 244 246;
  --just-ui-gray-200: 229 231 235;
  --just-ui-gray-300: 209 213 219;
  --just-ui-gray-400: 156 163 175;
  --just-ui-gray-500: 107 114 128;
  --just-ui-gray-600: 75 85 99;
  --just-ui-gray-700: 55 65 81;
  --just-ui-gray-800: 31 41 55;
  --just-ui-gray-900: 17 24 39;

  /* Spacing */
  --just-ui-spacing-unit: 0.25rem;
  --just-ui-spacing-xs: calc(var(--just-ui-spacing-unit) * 1);
  --just-ui-spacing-sm: calc(var(--just-ui-spacing-unit) * 2);
  --just-ui-spacing-md: calc(var(--just-ui-spacing-unit) * 4);
  --just-ui-spacing-lg: calc(var(--just-ui-spacing-unit) * 6);
  --just-ui-spacing-xl: calc(var(--just-ui-spacing-unit) * 8);

  /* Border Radius */
  --just-ui-radius-sm: 0.125rem;
  --just-ui-radius-md: 0.375rem;
  --just-ui-radius-lg: 0.5rem;
  --just-ui-radius-xl: 0.75rem;
  --just-ui-radius-full: 9999px;

  /* Shadows */
  --just-ui-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --just-ui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --just-ui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --just-ui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

  /* Typography */
  --just-ui-font-sans: system-ui, -apple-system, sans-serif;
  --just-ui-font-mono: ui-monospace, monospace;
  --just-ui-font-size-xs: 0.75rem;
  --just-ui-font-size-sm: 0.875rem;
  --just-ui-font-size-md: 1rem;
  --just-ui-font-size-lg: 1.125rem;
  --just-ui-font-size-xl: 1.25rem;

  /* Animation */
  --just-ui-transition-fast: 150ms;
  --just-ui-transition-normal: 300ms;
  --just-ui-transition-slow: 500ms;
}

Dark Mode

Built-in dark mode support with automatic detection:

/* Automatic dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --just-ui-background: 17 24 39;
    --just-ui-foreground: 249 250 251;
    --just-ui-muted: 31 41 55;
    --just-ui-border: 55 65 81;
  }
}

/* Manual dark mode toggle */
.dark {
  --just-ui-background: 17 24 39;
  --just-ui-foreground: 249 250 251;
}

Component-level Styling

Fine-grained control with style props:

<Button
  backgroundColor="#10b981"
  hoverBackgroundColor="#059669"
  borderRadius="12px"
  padding="12px 24px"
  fontSize="18px"
>
  Custom Styled Button
</Button>

TypeScript Support

Full TypeScript support with comprehensive type definitions.

Type Exports

import type {
  ButtonProps,
  CheckboxProps,
  InputProps,
  SelectOption,
  TableColumn,
  AnchorProps,
  PopoverProps,
  ProgressSegment,
  SliderMark,
} from 'its-just-ui'

Generic Components

// Typed table columns
const columns: TableColumn<User>[] = [
  {
    id: 'name',
    header: 'Name',
    accessorKey: 'name',
    cell: ({ row }) => `${row.firstName} ${row.lastName}`,
  },
]

// Typed select options
const options: SelectOption<number>[] = [
  { value: 1, label: 'Option 1' },
  { value: 2, label: 'Option 2' },
]

Custom Component Props

interface CustomButtonProps extends ButtonProps {
  customProp?: string
}

const CustomButton: React.FC<CustomButtonProps> = ({ customProp, ...props }) => {
  return <Button {...props} />
}

Accessibility

Built with accessibility as a core principle:

ARIA Support

  • ✅ Proper ARIA attributes and roles
  • ✅ Semantic HTML elements
  • ✅ Screen reader announcements
  • ✅ Live regions for dynamic content

Keyboard Navigation

  • ✅ Tab navigation
  • ✅ Arrow key navigation
  • ✅ Enter/Space activation
  • ✅ Escape key handling
  • ✅ Focus trapping for modals

Visual Accessibility

  • ✅ WCAG AA color contrast
  • ✅ Focus indicators
  • ✅ High contrast mode support
  • ✅ Reduced motion support

Testing

  • ✅ Tested with NVDA
  • ✅ Tested with JAWS
  • ✅ Tested with VoiceOver
  • ✅ Keyboard-only testing

Browser Support

Modern browser support with graceful degradation:

Browser Version
Chrome Last 2 versions
Firefox Last 2 versions
Safari Last 2 versions
Edge Last 2 versions
iOS Safari 12.0+
Chrome Android Last 2 versions

Performance

Bundle Size

Tree-shakeable design for optimal bundle size:

// Import only what you need
import { Button, Input } from 'its-just-ui'

// Or import from specific entry points
import Button from 'its-just-ui/Button'
import Input from 'its-just-ui/Input'

Lazy Loading

Components support lazy loading:

const Dialog = lazy(() => import('its-just-ui/Dialog'))
const Table = lazy(() => import('its-just-ui/Table'))

Contributing

We welcome contributions! See our Contributing Guide.

Development Setup

# Clone the repository
git clone https://github.com/its-just-ui/its-just-ui.git
cd its-just-ui

# Install dependencies
npm install

# Start development server
npm run storybook

# Run tests
npm test

# Build library
npm run build

# Lint code
npm run lint

# Format code
npm run format

Commit Convention

We use conventional commits:

  • feat: New features
  • fix: Bug fixes
  • docs: Documentation changes
  • style: Code style changes
  • refactor: Code refactoring
  • test: Test changes
  • chore: Build/tooling changes

License

MIT © its-just-ui

Support

Acknowledgments

Built with ❤️ using:


Made with ❤️ for the React community
Building better UIs, one component at a time