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

@aghanim1206/ui-react

v0.2.0

Published

A modern, token-first React design system — built with **React**, **TypeScript**, **Vite**, **Storybook**, **CSS Variables**, and **BEM CSS**.

Readme

AGH UI

A modern, token-first React design system — built with React, TypeScript, Vite, Storybook, CSS Variables, and BEM CSS.

  • Package: @aghanim1206/ui-react
  • Documentation (Storybook): https://agh-ui.shifaelib.com/

Key features

  • Token-first theming via CSS variables (easy to override, no runtime dependency)
  • Accessible by default (semantic HTML, keyboard support, focus states)
  • Consistent API across components (predictable props, variants, sizing)
  • Modern DX: TypeScript types, Vite-based build, Storybook documentation
  • BEM CSS architecture with a clean, framework-friendly styling approach

Installation

npm install @aghanim1206/ui-react
pnpm add @aghanim1206/ui-react
yarn add @aghanim1206/ui-react

Basic usage

  1. Import the CSS once (typically in your app entry: main.tsx / index.tsx).
import "@aghanim1206/ui-react/style.css";
  1. Import and use components.
import { Button, Input } from "@aghanim1206/ui-react";

export function Example() {
  return (
    <div>
      <Input label="Email" placeholder="[email protected]" />
      <Button variant="primary">Continue</Button>
    </div>
  );
}

Components

| Category | Components | | --- |----------------------------------------------------| | Typography | Typography | | Actions | Button | | Feedback | Badge, Toast | | Layout | Card | | Form fields | Input, Textarea, Select | | Selection controls | Checkbox, CheckboxGroup, Radio, RadioGroup | | Icons | Icon |


Theming

AGH UI is themed with CSS variables (design tokens) defined in the shipped styles. You generally don’t theme components by overriding component CSS — you theme by overriding tokens.

Tokens (example)

These are the core tokens you’ll typically customize:

  • --background, --foreground
  • --primary, --primary-foreground
  • --muted, --muted-foreground
  • --border, --input, --ring

Light / Dark mode

Dark mode is enabled by adding the .dark class at a high level (usually on html or body).

<html lang="en" class="dark">
  <!-- app -->
</html>

Color themes (blue / green / purple)

Theme variants are applied via theme classes:

  • Default (blue): no extra class (uses :root tokens)
  • Green: .theme-green
  • Purple: .theme-purple

You can combine a color theme with dark mode:

<body class="theme-green dark">
  <!-- app -->
</body>

Override a theme in your app

You can override tokens in your application CSS (or in a wrapper element) to create a custom theme.

/* Example only — adapt for your app */
:root {
  --primary: #2f669c;
  --background: #f4f6f9;
}

/* Example only — if your app toggles a `.dark` class on a parent element */
/* .dark { ...token overrides... } */

Documentation

Storybook is the source of truth for component usage, variants, states, and accessibility notes:

  • https://agh-ui.shifaelib.com/

Design principles

  • Token-first: design decisions live in variables (color, spacing, radii, typography)
  • Accessible components: semantic HTML, keyboard support, visible focus, sensible ARIA patterns
  • Consistent API: predictable props, variants, and sizing across the system
  • Reusable React components: composable building blocks for product UIs

Example: Button + Input + Card

import "@aghanim1206/ui-react/style.css";
import { Button, Card, Input, Typography } from "@aghanim1206/ui-react";

export function LoginCard() {
  return (
    <Card>
      <div style={{ display: "grid", gap: 12 }}>
        <div>
          <Typography variant="heading" as="h2">
            Sign in
          </Typography>
          <Typography variant="body" color="muted">
            Use your work email to continue.
          </Typography>
        </div>

        <Input label="Email" placeholder="[email protected]" />

        <Button fullWidth variant="primary">
          Continue
        </Button>
      </div>
    </Card>
  );
}

Accessibility

AGH UI aims to provide accessible defaults:

  • keyboard navigation support
  • visible focus states (:focus-visible)
  • disabled and error states
  • labels, descriptions, and semantic markup where applicable

If you spot an accessibility issue, please open an issue with a minimal repro and expected behavior.


Contributing

Scripts

| Script | Purpose | | --- | --- | | pnpm install | Install dependencies | | pnpm dev | Run local dev environment | | pnpm build | Build the library | | pnpm storybook | Run Storybook locally | | pnpm build-storybook | Build static Storybook |


Roadmap

Planned components and features:

  • Modal / Dialog
  • Tooltip
  • Dropdown
  • Combobox
  • AsyncSelect

License

MIT © Ahmed Ghanim