A comprehensive, modern React component library built with TypeScript, Tailwind CSS, and Storybook for professional web applications.
- π¨ 25+ Production-Ready Components - Comprehensive component library
- π§ Full TypeScript Support - Type-safe development experience
- π Dark Mode Ready - Built-in dark mode support
- π± Responsive Design - Mobile-first approach
- βΏ Accessibility First - WCAG compliant components
- π Comprehensive Documentation - Detailed Storybook stories
- π Performance Optimized - Tree-shakeable and lightweight
- πͺ Customizable - Easy to theme and extend
# Clone the repository
git clone https://github.com/ardelingga/react-ui-components.git
cd react-ui-components
# Install dependencies
npm install
# Start development server
npm run dev
# Start Storybook
npm run storybook
# Build for production
npm run build
- Button - Multiple variants with loading states
- Input - Text inputs with validation styling
- Label - Form labels with required indicators
- Form - Complete form system with validation
- Checkbox - Custom styled checkboxes
- Select - Dropdown select component
- Toggle - Switch toggle component
- ToggleGroup - Grouped toggle selections
- Card - Flexible card container with sections
- Modal - Dialog modals with animations
- Sheet - Slide-out panels
- Dialog - Confirmation and alert dialogs
- Collapsible - Expandable content areas
- Separator - Content dividers
- NavigationMenu - Multi-level navigation with dropdowns
- Breadcrumb - Hierarchical navigation
- DropdownMenu - Context menus and dropdowns
- Table - Sortable tables with responsive design
- Avatar - User avatars with fallbacks
- Badge - Status indicators and labels
- Alert - Notification and alert messages
- Skeleton - Loading state placeholders
- Tooltip - Contextual information tooltips
- Icon - Lucide React icon integration
- Home Page - Landing page with hero section
- Login Page - Authentication with social login
- Register Page - User registration with validation
import { Button } from './components/Button/Button';
// Primary button
<Button variant="primary" size="md">
Save Changes
</Button>
// Loading state
<Button variant="primary" loading>
Processing...
</Button>
// With icon
<Button variant="outline">
<Icon iconNode={Download} className="mr-2 h-4 w-4" />
Download
</Button>
import {
Card,
CardHeader,
CardContent,
CardFooter,
} from "./components/Card/Card";
<Card className="w-full max-w-md">
<CardHeader>
<h3 className="text-lg font-semibold">Product Card</h3>
</CardHeader>
<CardContent>
<p>Detailed product description goes here.</p>
</CardContent>
<CardFooter>
<Button className="w-full">Add to Cart</Button>
</CardFooter>
</Card>;
import { Form, FormField, FormLabel, FormInput } from "./components/Form/Form";
<Form onSubmit={handleSubmit}>
<FormField>
<FormLabel htmlFor="email" required>
Email
</FormLabel>
<FormInput
id="email"
type="email"
placeholder="Enter your email"
required
/>
</FormField>
<Button type="submit">Submit</Button>
</Form>;
import {
Table,
TableHeader,
TableBody,
TableRow,
TableHead,
TableCell,
} from "./components/Table/Table";
<Table>
<TableHeader>
<TableRow>
<TableHead sortable onSort={() => handleSort("name")}>
Name
</TableHead>
<TableHead sortable onSort={() => handleSort("email")}>
Email
</TableHead>
<TableHead>Status</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{users.map((user) => (
<TableRow key={user.id}>
<TableCell>{user.name}</TableCell>
<TableCell>{user.email}</TableCell>
<TableCell>
<Badge variant={user.active ? "success" : "secondary"}>
{user.active ? "Active" : "Inactive"}
</Badge>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>;
src/
βββ components/
β βββ Alert/
β β βββ Alert.tsx
β β βββ Alert.stories.tsx
β βββ Button/
β β βββ Button.tsx
β β βββ Button.stories.tsx
β βββ Card/
β β βββ Card.tsx
β β βββ Card.stories.tsx
β βββ ... (other components)
βββ pages/
β βββ Home/
β βββ LoginPage/
β βββ RegisterPage/
βββ lib/
β βββ utils.ts
βββ App.tsx
βββ main.tsx
Every component includes comprehensive Storybook stories:
- Default states
- All variants and sizes
- Interactive examples
- Responsive previews
- Accessibility testing
- Dark mode examples
# Run Storybook
npm run storybook
# Production build
npm run build
# Preview build locally
npm run preview
# Build Storybook
npm run build-storybook
# Development
npm run dev # Start dev server
npm run storybook # Start Storybook
# Building
npm run build # Build for production
npm run build-storybook # Build Storybook
# Code Quality
npm run lint # Run ESLint
npm run type-check # TypeScript type checking
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'feat: add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow TypeScript best practices
- Include Storybook stories for new components
- Maintain responsive design principles
- Ensure accessibility compliance
- Write meaningful commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
Ardelingga Pramesta Kusuma
- GitHub: @ardelingga
- LinkedIn: Ardelingga Pramesta Kusuma
- Portfolio: ardelingga.dev
- Tailwind CSS for the utility-first CSS framework
- Radix UI for accessible component primitives
- Lucide React for beautiful icons
- Class Variance Authority for variant management
- Storybook for component documentation
β Star this repository if it helped you! β
Made with β€οΈ and β by Ardelingga