A beautiful, lightweight, and easy-to-use React UI component library built with modern best practices.
- π Easy to Use - Simple API and great documentation
- π¨ Fully Customizable - Style components to match your design
- π¦ Lightweight - Minimal dependencies, optimal performance
- βΏ Accessible - Built with accessibility in mind
- π± Responsive - Works perfectly on all devices
- π Beautiful - Modern design out of the box
npm install @jwafadev/ui-components
# or
yarn add @jwafadev/ui-componentsimport React from 'react';
import { Button, Card, Badge } from '@jwafadev/ui-components';
function App() {
return (
<div>
<Card>
<Card.Header>Welcome to UI Components</Card.Header>
<Card.Body>
<Badge variant="success">New</Badge>
<p>Start building beautiful UIs!</p>
</Card.Body>
</Card>
<Button variant="primary" onClick={() => alert('Hello!')}>Click Me</Button>
</div>
);
}
export default App;Customizable button with multiple variants and sizes.
<Button variant="primary">Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="danger">Danger</Button>
<Button size="lg">Large Button</Button>
<Button disabled>Disabled</Button>Props:
variant: 'primary' | 'secondary' | 'danger' (default: 'primary')size: 'sm' | 'md' | 'lg' (default: 'md')disabled: booleanonClick: function
Container component for grouping content.
<Card>
<Card.Header>Card Title</Card.Header>
<Card.Body>
<p>This is the main content of the card</p>
</Card.Body>
<Card.Footer>Card Footer</Card.Footer>
</Card>Props:
children: React elementsclassName: string (optional)
Small label component for status indicators.
<Badge variant="success">Success</Badge>
<Badge variant="warning">Warning</Badge>
<Badge variant="error">Error</Badge>
<Badge variant="primary">Primary</Badge>Props:
variant: 'primary' | 'success' | 'warning' | 'error' | 'secondary' (default: 'primary')children: string or React element
Text input with validation support.
<Input placeholder="Enter your name" />
<Input type="email" placeholder="Email" />
<Input type="password" placeholder="Password" />
<Input error disabled />
<Input size="lg" />Props:
type: string (default: 'text')placeholder: stringerror: booleandisabled: booleansize: 'sm' | 'md' | 'lg' (default: 'md')
Dialog component for user interactions.
const [isOpen, setIsOpen] = useState(false);
return (
<>
<Button onClick={() => setIsOpen(true)}>Open Modal</Button>
<Modal
isOpen={isOpen}
onClose={() => setIsOpen(false)}
title="Modal Title"
size="md"
>
<p>Modal content goes here</p>
</Modal>
</>
);Props:
isOpen: booleanonClose: functiontitle: stringsize: 'sm' | 'md' | 'lg' (default: 'md')children: React elements
Select menu component.
const [value, setValue] = useState('');
return (
<Dropdown
value={value}
onChange={setValue}
placeholder="Select an option"
options={[
{ label: 'Option 1', value: '1' },
{ label: 'Option 2', value: '2' },
{ label: 'Option 3', value: '3' },
]}
/>
);Props:
value: stringonChange: functionoptions: Array<{label: string, value: string}>placeholder: stringdisabled: boolean
git clone https://github.com/jwafaDev/UI-Component-Library.git
cd UI-Component-Library
npm installnpm run devOpen http://localhost:5173 to see your components.
npm run buildSee the examples/ directory for more complete 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
MIT License - see LICENSE file for details
If you have any questions or issues, please open an issue on GitHub.
Made with β€οΈ by jwafaDev
β If you find this library helpful, please give it a star!