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

@altahq/design-system

v0.0.15

Published

Alta Design System - A React component library

Downloads

87

Readme

@altahq/design-system

A modern React component library built with Tailwind CSS v4, Radix UI primitives, and class-variance-authority for variant management.

Installation

yarn add @altahq/design-system

Peer Dependencies

Ensure you have these peer dependencies installed:

yarn add react react-dom tailwindcss@^4.1.17 class-variance-authority clsx tailwind-merge radix-ui @carbon/icons-react

Setup

1. Import Styles

Import the design system styles in your application's entry point:

import '@altahq/design-system/styles/styles.css';

2. Configure Tailwind (if using custom Tailwind config)

The design system uses Tailwind CSS v4 with CSS variables for theming. The styles are self-contained, but if you need to extend or customize, reference the included CSS variables.

Usage

Importing Components

Components are exported individually for optimal tree-shaking:

import { Button } from '@altahq/design-system/components/ui/button';
import { Input } from '@altahq/design-system/components/ui/input';
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@altahq/design-system/components/ui/dialog';

Importing Icons

Icons are re-exported from @carbon/icons-react along with custom Alta icons:

import { Add, Close, Email, Settings } from '@altahq/design-system/icons';

Importing Utilities

import { cn } from '@altahq/design-system/lib/utils';

Components

Form Controls

| Component | Description | | ------------- | ----------------------------------------- | | Button | Primary interactive element with variants | | Input | Text input field | | Textarea | Multi-line text input | | Checkbox | Toggle selection control | | Radio Group | Single selection from options | | Switch | Toggle switch control | | Slider | Range selection control | | Field | Form field wrapper with label support | | Label | Accessible form label |

Layout & Structure

| Component | Description | | -------------- | ------------------------------------ | | Card | Container with elevation and padding | | Separator | Visual divider | | Resizable | Resizable panel layouts | | Scroll Area | Custom scrollable container | | Aspect Ratio | Maintain aspect ratio for content | | Sidebar | Application sidebar navigation |

Overlay & Dialogs

| Component | Description | | --------------- | ------------------------------- | | Dialog | Modal dialog | | Alert Dialog | Confirmation dialog | | Sheet | Slide-out panel | | Popover | Floating content container | | Tooltip | Contextual information on hover | | Hover Card | Rich content on hover | | Dropdown Menu | Menu triggered by button | | Context Menu | Right-click menu |

Navigation

| Component | Description | | ------------ | ------------------------ | | Tabs | Tabbed navigation | | Breadcrumb | Navigation breadcrumbs | | Command | Command palette / search |

Feedback & Status

| Component | Description | | ---------- | -------------------- | | Alert | Inline alert message | | Badge | Status indicator | | Progress | Progress indicator | | Spinner | Loading indicator | | Skeleton | Loading placeholder | | Sonner | Toast notifications |

Data Display

| Component | Description | | ------------- | ---------------------------- | | Avatar | User avatar display | | Accordion | Collapsible content sections | | Collapsible | Single collapsible section | | Carousel | Image/content carousel | | Text | Typography component | | Kbd | Keyboard shortcut display |

Grouping

| Component | Description | | -------------- | ------------------------ | | Button Group | Group of related buttons | | Input Group | Input with addons | | Toggle | Single toggle button | | Toggle Group | Group of toggle buttons | | Item | Generic item component |

Button Variants

The Button component supports multiple variants and sizes:

import { Button } from '@altahq/design-system/components/ui/button';

// Variants
<Button variant="primary">Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="tertiary">Tertiary</Button>
<Button variant="outline">Outline</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="destructive">Destructive</Button>
<Button variant="link">Link</Button>

// Sizes
<Button size="xs">Extra Small</Button>
<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>
<Button size="icon">Icon Only</Button>
<Button size="icon-md">Medium Icon</Button>
<Button size="icon-lg">Large Icon</Button>

With Icons

import { Button } from '@altahq/design-system/components/ui/button';
import { Email } from '@altahq/design-system/icons';

<Button>
  <Email /> Send Email
</Button>;

Theming

The design system uses CSS custom properties for theming with built-in light and dark mode support.

CSS Variables

Key color tokens available:

| Variable | Description | | ------------------------ | ------------------- | | --background | Page background | | --foreground | Primary text color | | --primary | Primary brand color | | --primary-foreground | Text on primary | | --secondary | Secondary color | | --secondary-foreground | Text on secondary | | --muted | Muted backgrounds | | --muted-foreground | Muted text | | --accent | Accent color | | --destructive | Error/danger color | | --border | Border color | | --input | Input border color | | --ring | Focus ring color |

Dark Mode

Dark mode is automatically applied when the .dark class is present on a parent element:

<html className="dark">{/* Dark mode active */}</html>

Or use a theme provider like next-themes:

import { ThemeProvider } from 'next-themes';

<ThemeProvider attribute="class" defaultTheme="system">
  <App />
</ThemeProvider>;

Utility Functions

cn() - Class Name Merger

Combines class names with Tailwind merge support:

import { cn } from '@altahq/design-system/lib/utils';

const className = cn(
  'base-class',
  isActive && 'active-class',
  variant === 'primary' && 'bg-primary text-primary-foreground'
);

Architecture

src/
├── components/
│   └── ui/                    # UI components
│       ├── button/
│       │   ├── button.tsx     # Component implementation
│       │   ├── button.stories.tsx  # Storybook stories
│       │   └── index.ts       # Public exports
│       └── ...
├── hooks/
│   └── use-mobile.ts          # Custom hooks
├── icons/
│   ├── custom/                # Custom Alta icons
│   └── index.ts               # Re-exports Carbon icons
├── lib/
│   └── utils.ts               # Utility functions
└── styles/
    └── styles.css             # Global styles & CSS variables

Technology Stack

  • React 19 - UI framework
  • Tailwind CSS v4 - Utility-first CSS
  • Radix UI - Accessible primitives
  • class-variance-authority - Variant management
  • Carbon Icons - Icon library
  • Storybook - Component documentation

License

MIT © Alta