eha-design-system
v0.2.1
Published
EHA Design System - React component library
Maintainers
Readme
EHA Design System
A React component library built for eHealth Africa applications.
Documentation
- Storybook: ehealthafrica.github.io/design-system
- Chromatic: Visual testing and review platform
Installation
npm install eha-design-systemPeer Dependencies
npm install react react-domUsage
import { Button, Modal, ThemeProvider } from 'eha-design-system';
function App() {
return (
<ThemeProvider>
<Button variant="primary">Click me</Button>
</ThemeProvider>
);
}Components
The design system includes 25+ components:
- Layout: Accordion, Divider, Modal, Drawer, Tabs, Steps
- Navigation: Breadcrumb, Dropdown, Sidenav, PageHeader
- Forms: Button, Checkbox, Input, DatePicker, SelectPicker, Radio
- Data Display: Table, Avatar, Badge, Tag, Progress, Loader
- Feedback: Notification, MetricCard
Development
Prerequisites
- Node.js v18+
- npm v9+
Setup
# Clone the repository
git clone https://github.com/eHealthAfrica/design-system.git
cd design-system
# Install dependencies
npm install
# Start Storybook
npm run storybookScripts
| Command | Description |
|---------|-------------|
| npm run storybook | Start Storybook dev server on port 6006 |
| npm run build | Build the library for distribution |
| npm run build-storybook | Build static Storybook |
Project Structure
src/
├── components/ # Component library (25+ components)
├── templates/ # Page templates
├── stories/ # Documentation pages
├── theme/ # Design tokens and theme config
├── index.css # Global styles
└── index.ts # Main exportsContributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-component) - Make your changes
- Run Storybook to test (
npm run storybook) - Commit your changes
- Push to your branch
- Open a Pull Request
License
MIT
