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

altitude-ui

v1.0.0

Published

React UI components for the Altitude design system

Readme

@altitude/ui

React UI components for the Altitude design system, built on top of shadcn/ui and styled with Altitude design tokens.

Installation

npm install @altitude/ui
# or
pnpm add @altitude/ui

Architecture

This package combines the best of both worlds:

  • shadcn/ui: Provides the foundation, accessibility, and component patterns
  • Altitude Design Tokens: Replaces shadcn/ui's default colors and typography with our design system

Components are built using:

  • Radix UI: For accessibility and behavior
  • class-variance-authority: For type-safe variant management
  • Tailwind CSS: For styling with Altitude design tokens

Usage

Button

The Button component is built on shadcn/ui's Button but styled with Altitude design tokens.

import { Button } from '@altitude/ui';

function Example() {
  return (
    <div className="flex gap-2 flex-wrap">
      {/* Default variant */}
      <Button>Primary Button</Button>
      
      {/* Other variants */}
      <Button variant="secondary">Secondary</Button>
      <Button variant="outline">Outline</Button>
      <Button variant="ghost">Ghost</Button>
      <Button variant="link">Link</Button>
      <Button variant="destructive">Destructive</Button>
      
      {/* Different sizes */}
      <Button size="sm">Small</Button>
      <Button size="lg">Large</Button>
      <Button size="xl">Extra Large</Button>
      <Button size="icon">🎯</Button>
    </div>
  );
}

Button Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | variant | 'default' \| 'secondary' \| 'outline' \| 'ghost' \| 'link' \| 'destructive' | 'default' | Visual style variant | | size | 'sm' \| 'default' \| 'lg' \| 'xl' \| 'icon' | 'default' | Size of the button | | asChild | boolean | false | Render as child element (for composition) |

All standard HTML button attributes are also supported.

Design Token Integration

The Button component uses Altitude design tokens:

  • Colors: primary-*, neutral-*, semantic-error, base-white
  • Typography: body-xs, body-sm, body-md, body-lg font sizes
  • Focus states: primary-500 ring color
  • Hover states: Consistent with design system color scales

asChild Pattern

Use the asChild prop for composition with other components (powered by Radix UI Slot):

import { Button } from '@altitude/ui';
import Link from 'next/link';

<Button asChild>
  <Link href="/dashboard">Go to Dashboard</Link>
</Button>

shadcn/ui Integration

This package is configured to work with shadcn/ui:

  • Uses the same component patterns and APIs
  • Configured with components.json for CLI compatibility
  • Can add more shadcn/ui components with: npx shadcn@latest add [component]
  • All components are automatically styled with Altitude design tokens

Development

# Build the package
pnpm build

# Watch for changes
pnpm dev

# Run linting
pnpm lint

# Type checking
pnpm check-types

# Add more shadcn/ui components
npx shadcn@latest add [component-name]

Adding New Components

To add more shadcn/ui components:

  1. Run npx shadcn@latest add [component-name]
  2. Update the generated component to use Altitude design tokens
  3. Export the component from src/index.ts
  4. Update this README with usage examples