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

@rubriclab/ui

v5.1.55

Published

UI library

Readme

@rubriclab/ui

A small, typed React UI kit built on Radix UI and Tailwind CSS. Tree‑shakable, accessible, and designed to work with any React application.

Installation

# with bun
bun add @rubriclab/ui

# with npm
npm i @rubriclab/ui

# with pnpm
pnpm add @rubriclab/ui

Peer requirements:

  • react ^19.0.0
  • react-dom ^19.0.0

Recommended: Tailwind CSS for styling (tailwindcss and postcss).

Quickstart

  1. Ensure Tailwind CSS is set up in your app (see Tailwind docs). Components render with utility classNames and look best with your Tailwind theme.

  2. Import components directly from the package:

import { Button, Container, Form, Input } from '@rubriclab/ui'

export const Example = () => {
	return (
		<Container>
			<Form>
          <Input placeholder="Title" />
          <Button type="submit" label="Save" />
      </Form>
		</Container>
	)
}

Notes:

  • Icon uses names from lucide-react (e.g. "Check", "AlertCircle"). size is in Tailwind units (1 = 4px).
  • All components are typed and tree‑shakable.

Available components

Browse the src/components directory for props and more examples.

Usage

This library works with any React setup (Next.js, Vite, Create React App, Remix, etc.). Most components are SSR‑friendly; interactive parts rely on Radix primitives.

Theme variables (Tailwind + globals.css)

This library relies on a small set of Tailwind tokens that map to CSS variables. Components use classes like bg-background, text-foreground, border-border, bg-accent, text-destructive, etc., and a few spots reference CSS variables directly (e.g., charts use var(--background), var(--foreground), var(--border), var(--hover)).

Required tokens/variables:

  • background → --background
  • foreground → --foreground
  • primary → --primary
  • accent → --accent
  • accent-foreground → --accent-foreground (recommended so selected items render readable text)
  • border → --border
  • hover → --hover
  • destructive → --destructive
  • muted → --muted
  • muted-foreground → --muted-foreground
  • rounded → --radius

Recommended setup with Tailwind v4 (@theme inline) in your ./globals.css:

@import "tailwindcss";

@source "./node_modules/@rubriclab/ui";

:root {
  --background: #ffffff;
  --foreground: #171717;
  --primary: oklch(54.6% 0.245 262.881);
  --accent: oklch(96.53% 0.004 262.56);
  --border: oklch(86.68% 0.017 261.56);
  --hover: oklch(92.05% 0.008 262.67);
  --destructive: oklch(62.72% 0.233 29.22);
  --muted: oklch(98.27% 0.001 95.47);
  --muted-foreground: oklch(13.68% 0.034 0.09);
  --radius: 0.5rem;
  /* Optional but recommended */
  --accent-foreground: #111111;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
    --primary: oklch(54.6% 0.245 262.881);
    --accent: oklch(21.41% 0.007 89.49 / 60%);
    --border: oklch(26.98% 0.009 89.63);
    --hover: oklch(21.41% 0.007 89.49);
    --destructive: oklch(62.72% 0.233 29.22);
    --muted: oklch(15.48% 0.006 89.58);
    --muted-foreground: oklch(86.68% 0.017 261.56);
    --radius: 0.5rem;
    /* Optional but recommended */
    --accent-foreground: #fafafa;
  }
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-primary: var(--primary);
  --color-border: var(--border);
  --color-hover: var(--hover);
  --color-destructive: var(--destructive);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --radius-default: var(--radius);  /* Radius token for rounded utilities */
}

@layer base {
	* {
		border-color: var(--border, currentColor);
	}
}

Using Tailwind v3 instead? Map tokens in tailwind.config.{js,ts} to the same CSS variables:

// tailwind.config.ts
import type { Config } from 'tailwindcss'

export default {
  content: ['./src/**/*.{ts,tsx,js,jsx}'],
  theme: {
    extend: {
      colors: {
        background: 'var(--background)',
        foreground: 'var(--foreground)',
        primary: 'var(--primary)',
        accent: 'var(--accent)',
        'accent-foreground': 'var(--accent-foreground)',
        border: 'var(--border)',
        hover: 'var(--hover)',
        destructive: 'var(--destructive)',
        muted: 'var(--muted)',
        'muted-foreground': 'var(--muted-foreground)'
      }
    }
  },
  plugins: []
} satisfies Config

Notes:

  • Some components (e.g., Select, DropdownMenu) also use Radix UI internal variables like --radix-select-trigger-height; you do not need to define these.
  • If accent-foreground isn’t provided, elements with text-accent-foreground may inherit an unintended color. Defining it ensures good contrast on selected/active states.

Types

All component props are exported via TypeScript types:

import type { ButtonProps } from '@rubriclab/ui'

Changelog & releases

Conventional commits automatically bump the version and update the changelog. If your local hooks didn’t run, try:

bun prepare

License

Apache-2.0 © Rubric Lab

See LICENSE for details.