npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eha-design-system

v0.2.5

Published

EHA Design System - React component library

Readme

EHA Design System

A React component library built for eHealth Africa applications.

Storybook npm version

Documentation

Installation

pnpm install eha-design-system

Peer Dependencies

pnpm add react react-dom

Usage

import { Button, Modal, ThemeProvider } from 'eha-design-system';

function App() {
  return (
    <ThemeProvider brand="eha">
      <Button variant="primary">Click me</Button>
    </ThemeProvider>
  );
}

Multibrand Theming

The design system supports multiple product brands, each with its own color identity. Themes are applied via CSS custom properties (--ds-*) injected at runtime, so switching brands requires no rebuild.

Supported Brands

| Brand ID | Product | |----------|----------------------| | "eha" | eHealth Africa (default) | | "lomis"| LoMIS | | "planfeld"| PlanFeld | | "reach"| Reach Data Portal |

Using ThemeProvider

Wrap your application root and pass the brand prop:

import { ThemeProvider } from 'eha-design-system';

<ThemeProvider brand="reach">
  <App />
</ThemeProvider>

Passing a different brand prop at runtime will re-apply all CSS variables automatically — no page reload needed.

Static CSS Import (alternative)

If you prefer to avoid ThemeProvider, import a pre-generated brand CSS file at your app entry point:

// main.tsx
import 'eha-design-system/styles/brands/reach.css';

This sets --ds-* variables on :root but does not support runtime brand switching.

Using Brand Tokens in Your Own CSS

All components reference --ds-* CSS variables, which you can use in your own styles too:

.my-element {
  background-color: var(--ds-color-primary-40);
  color: var(--ds-text-primary);
  border-color: var(--ds-border-default);
}

Theme Exports

| Export | Description | |-------------------------------|----------------------------------------------------------| | ThemeProvider | React component — wraps app to apply brand theme | | applyRSuiteTheme(brand) | Imperatively apply a brand's CSS variables to the DOM | | generateBrandCSSVariables() | Convert brand token set to a flat --ds-* variable map | | brands | Registry of all brand token sets | | BrandId | TypeScript union type: 'eha' \| 'lomis' \| 'planfeld' \| 'reach' | | designTokens | Full token object (colors, spacing, typography, etc.) |

Components

The design system includes 23 components:

  • Layout: Accordion, 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+
  • pnpm v10+

Setup

# Clone the repository
git clone https://github.com/eHealthAfrica/design-system.git
cd design-system

# Install dependencies
pnpm install

# Start Storybook
pnpm storybook

Scripts

| Command | Description | |--------------------------|------------------------------------------| | pnpm storybook | Start Storybook dev server on port 6006 | | pnpm build | Build the library for distribution | | pnpm build-storybook | Build static Storybook | | pnpm lint | Run Biome CI checks | | pnpm lint:fix | Auto-fix lint and formatting issues | | pnpm export-tokens | Export tokens from Figma | | pnpm generate-brand-css| Regenerate styles/brands/*.css files | | pnpm vitest | Run unit tests |

Project Structure

src/
├── components/          # 23 components
├── templates/           # Page templates
├── stories/             # Documentation pages
├── theme/               # Design tokens, brand definitions, RSuite theme bridge
│   └── tokens/
│       └── brands/      # Per-brand token files (eha, lomis, planfeld, reach)
├── index.css            # Global styles
└── index.ts             # Main exports
scripts/
├── generate-brand-css.js  # Generates styles/brands/*.css from brand tokens
└── export-figma-tokens.js # Exports tokens from Figma
styles/
└── brands/              # Pre-generated brand CSS files (eha, lomis, planfeld, reach)

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-component)
  3. Make your changes
  4. Run Storybook to test (pnpm storybook)
  5. Commit your changes
  6. Push to your branch
  7. Open a Pull Request

License

MIT