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

@crimson_/altarev

v1.1.0

Published

A React + TypeScript + Tailwind CSS v4 component library

Readme

altarev

A React + TypeScript + Tailwind CSS v4 component library. 37 accessible, themeable components built on native HTML elements.

Install

npm install altarev

react and react-dom (v18+) are peer dependencies.

Setup

Import the stylesheet once, at the root of your app. Without this, components render unstyled.

import "altarev/styles.css";

Then use any component:

import { Button, TextInput, Tooltip } from "altarev";

export function Example() {
  return (
    <Tooltip content="Saves your changes">
      <Button>Save</Button>
    </Tooltip>
  );
}

The stylesheet ships the full design-token layer (colors, type scale, spacing) as CSS custom properties, so it is self-contained — you do not need Tailwind installed in your app to consume altarev.

Theming — use your own design tokens

Every color in altarev resolves through a CSS custom property at runtime. To re-theme the entire library, you override the property values. You never touch the component class names. This is the whole contract:

  • You control the values (the hex codes, the font).
  • altarev controls the names (--color-primary, bg-primary, …) so every component stays consistent.

The one rule

Declare your overrides in a plain :root block, after the altarev/styles.css import.

That's it. altarev's defaults live in a CSS cascade layer (@layer altarev.tokens), and by the CSS spec any un-layered :root you write automatically wins — no !important, no specificity tricks, no build config. Order in the file is what matters: your block comes after the import.

Minimal example

/* your app's global stylesheet, e.g. globals.css */
@import "altarev/styles.css";

:root {
  --color-primary: #e11d48; /* your brand color */
  --color-surface: #fffaf5;
  --color-text: #1a1208;
}

That single block retints bg-primary, text-primary, border-primary, the focus rings, and every other primary usage across all 37 components. Same for the other tokens.

If you import CSS through a bundler instead of a stylesheet, do the same thing in any global CSS that loads after the altarev import:

import "altarev/styles.css";
import "./theme.css"; // your :root overrides

Dark mode

Theming flips on a .dark class anywhere up the tree (usually <html> or <body>):

<html class="dark"></html>

Every token ships a light value (:root) and a dark value (.dark). To override the dark palette too, add a matching un-layered .dark block after the import:

@import "altarev/styles.css";

:root {
  --color-primary: #e11d48;
}
.dark {
  --color-primary: #fb7185; /* lighter for dark backgrounds */
}

Every token you can override

Colors (each is a normal CSS color — hex, rgb(), oklch(), anything):

| Token | Role | | ------------------------------------------ | ---------------------------------------- | | --color-primary | Primary / brand actions, focus rings | | --color-primary-tint | Faded primary (hover fills, range bands) | | --color-accent | Secondary accent | | --color-background | App background | | --color-surface | Card / panel surface | | --color-surface-raised | Elevated surface | | --color-text | Primary text | | --color-text-muted | Secondary / placeholder text | | --color-border | Borders, dividers | | --color-overlay | Modal / drawer scrim | | --color-hover | Generic hover wash | | --color-success / --color-success-tint | Success status | | --color-error / --color-error-tint | Error status | | --color-warning / --color-warning-tint | Warning status | | --color-info / --color-info-tint | Info status | | --color-input-error | Invalid form field border |

Typography — override the font with --font-altarev-sans:

:root {
  --font-altarev-sans: "Inter", system-ui, sans-serif;
}

The type scale (--text-xs--text-8xl, with line-heights) is part of the architecture and intentionally fixed, so spacing stays consistent across the system. Override font family, not the scale.

Do / Don't

Do override token values in an un-layered :root / .dark after the import. ✅ Do use any valid CSS color syntax (#hex, rgb(), hsl(), oklch()).

Don't wrap your overrides in @layer — that puts them back in competition with altarev's defaults and they may not win. Plain :root is what makes it bulletproof. ❌ Don't edit or re-map the Tailwind utility names (bg-primary, etc.) or the @theme block — those are the contract that keeps components consistent. Change the value the name points to instead. ❌ Don't rename tokens. A typo like --color-primry silently does nothing; the component keeps the default. Copy names from the table above.

Server Components / Next.js App Router

All components are client components and ship with the "use client" directive, so they work when imported directly into Server Components without extra wrapping.

Date components

Calendar, DateRangePicker, and TimePicker build on react-day-picker, which is an optional peer dependency. If you use any of them, install it:

npm install react-day-picker

The other 34 components have no such requirement.

Components

Accordion · Alert · AuthCode · Avatar · Breadcrumbs · Button · Calendar · Carousel · Checkbox · Chip · Combobox · Container · DateRangePicker · Drawer · Dropdown · EmptyState · Loader · Modal · Pagination · Popover · Progress · QuarterPicker · Radio · Search · SegmentedControl · Select · Sidebar · Snackbar · Switch · Table · Tabs · Tag · TextInput · TextInputGroup · Textarea · TimePicker · Tooltip

License

MIT