A modern, lightweight React component library built with TypeScript and styled with Tailwind CSS.
- Modern Stack: Built with React 19, TypeScript, and Tailwind CSS
- Tree Shakeable: Only import what you need
- TypeScript First: Full TypeScript support with exported types
- Customizable: Easy to style and extend
- Storybook: Interactive component documentation
- Lightweight: Minimal bundle size
- Developer Friendly: Simple API and great DX
npm install dustui
# or
yarn add dustui
# or
pnpm add dustuiimport { Button, Card } from 'dustui';
import 'dustui/styles.css';
function App() {
return (
<div>
<Card title="Welcome to DustUI">
<p>A modern React component library</p>
</Card>
<Button variant="primary" onClick={() => alert('Clicked!')}>
Click Me
</Button>
</div>
);
}A versatile button component with multiple variants and sizes.
import { Button } from 'dustui';
// Variants
<Button variant="primary">Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="outline">Outline</Button>
<Button variant="danger">Danger</Button>
// Sizes
<Button size="small">Small</Button>
<Button size="medium">Medium</Button>
<Button size="large">Large</Button>
// States
<Button disabled>Disabled</Button>
// Custom handler
<Button onClick={() => console.log('clicked')}>
Click Me
</Button>| Prop | Type | Default | Description |
|---|---|---|---|
children |
ReactNode |
- | Button content (required) |
variant |
'primary' | 'secondary' | 'outline' | 'danger' |
'primary' |
Button style variant |
size |
'small' | 'medium' | 'large' |
'medium' |
Button size |
disabled |
boolean |
false |
Disable the button |
onClick |
() => void |
- | Click handler |
type |
'button' | 'submit' | 'reset' |
'button' |
Button type |
className |
string |
'' |
Additional CSS classes |
A flexible card component for displaying content.
import { Card } from 'dustui';
// Basic card
<Card title="Card Title">
<p>Card content goes here</p>
</Card>
// With description
<Card
title="Card Title"
description="Card description"
>
<p>Card content</p>
</Card>
// Clickable card
<Card
title="Clickable Card"
onClick={() => console.log('Card clicked')}
>
<p>Click anywhere on this card</p>
</Card>
// Custom styling
<Card
title="Custom Card"
className="my-custom-class"
>
<p>Styled card content</p>
</Card>| Prop | Type | Default | Description |
|---|---|---|---|
children |
ReactNode |
- | Card content (required) |
title |
string |
- | Card title (optional) |
description |
string |
- | Card description (optional) |
onClick |
() => void |
- | Click handler for the card |
className |
string |
'' |
Additional CSS classes |
DustUI uses Tailwind CSS for styling. Make sure to import the styles in your application:
import 'dustui/styles.css';You can override styles by:
- Using className prop:
<Button className="my-custom-button">Custom Button</Button>- Using CSS/Tailwind classes:
.my-custom-button {
/* Your custom styles */
}- Node.js >= 18
- npm/yarn/pnpm
# Clone the repository
git clone https://github.com/Saisinare/dustui.git
cd dustui
# Install dependencies
npm install
# Start Storybook
npm run storybook
# Build the library
npm run build
# Run tests
npm run testnpm run dev- Start development servernpm run build- Build the librarynpm run storybook- Start Storybooknpm run build-storybook- Build Storybooknpm run lint- Lint the codenpm run test- Run tests
Visit our Storybook for interactive component documentation and examples.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Saisinare
- GitHub: @Saisinare
- Repository: dustui
- Built with Vite
- Styled with Tailwind CSS
- Documented with Storybook
Made with ❤️ by Saisinare