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

@resq-systems/ui

v0.41.1

Published

ResQ Systems shared UI component library — shadcn-based design system for the ResQ Systems platform

Readme

@resq-systems/ui

npm License Storybook

ResQ Systems's shared React component library — 63 components built on Radix UI primitives and Tailwind CSS v4 with a dark-first oklch color system, including a set of clean-room SVG flight instruments for fleet telemetry. Tree-shakeable subpath exports, WCAG AA contrast, full keyboard support.

Install

bun add @resq-systems/ui react react-dom tailwindcss
# or
npm install @resq-systems/ui react react-dom tailwindcss

react, react-dom, and tailwindcss are peer dependencies — bring your own.

Tailwind setup

Add the package to your Tailwind v4 sources:

/* app.css */
@import "tailwindcss";
@source "../node_modules/@resq-systems/ui/lib";

@import "@resq-systems/ui/styles/globals.css";

The globals.css sheet exposes the oklch palette as CSS custom properties and wires Tailwind's bg-background, text-foreground, etc. to those tokens.

Subpath imports

Every component ships its own subpath export to keep bundles small:

import { Button } from "@resq-systems/ui/button";
import { Card, CardHeader, CardTitle, CardContent } from "@resq-systems/ui/card";
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@resq-systems/ui/tabs";
import { Combobox } from "@resq-systems/ui/combobox";

The default export (@resq-systems/ui) re-exports everything for convenience but pulls the full surface — prefer subpaths in production code.

Component catalog

63 components grouped by intent:

| Group | Components | | :--- | :--- | | Layout | aspect-ratio, card, resizable, scroll-area, separator, sidebar, sheet | | Surfaces | accordion, alert, alert-dialog, collapsible, dialog, drawer, empty, hover-card, popover, tooltip | | Forms | button, button-group, checkbox, combobox, field, input, input-group, input-otp, label, native-select, radio-group, select, slider, switch, textarea, toggle, toggle-group | | Navigation | breadcrumb, command, context-menu, dropdown-menu, menubar, navigation-menu, pagination, tabs | | Feedback | badge, progress, skeleton, sonner (toasts), spinner | | Data | calendar, carousel, chart, table | | Misc | avatar, direction, icons, item, kbd, picture | | Instruments | attitude-indicator, heading-indicator, airspeed-indicator, altimeter, vertical-speed-indicator, turn-coordinator — clean-room SVG flight instruments (server-renderable, theme-aware, aria-labelled) |

Browse all components and variants at design.resq.software.

Utilities

Beyond components, the barrel exports a few helpers:

| Export | Import from | Description | | :--- | :--- | :--- | | cn | @resq-systems/ui/lib/utils | clsx + tailwind-merge class-name combiner. | | useIsMobile | @resq-systems/ui | Subscribes to a (max-width: 767px) matchMedia query; returns true below the mobile breakpoint (SSR-safe). | | getContrastingColor | @resq-systems/ui | Picks #000000 or #ffffff for maximum contrast against any CSS color. Browser-only — returns undefined on the server. |

import { cn } from "@resq-systems/ui/lib/utils";
import { getContrastingColor, useIsMobile } from "@resq-systems/ui";

Color types

getContrastingColor is backed by nominal, branded color types (from @resq-systems/types) re-exported from the barrel:

| Type | Shape | Notes | | :--- | :--- | :--- | | Channel | NumberRange<0, 255> | A single 8-bit color channel; out-of-gamut literals (e.g. 256) are a compile error. | | Rgb | readonly r / g / b, each a Channel | A parsed, always-valid RGB triple. | | RGB | Rgb \| null | Deprecated alias — prefer Rgb and express parse failure as Rgb \| null at each boundary. |

import type { Channel, Rgb, RGB } from "@resq-systems/ui";

Quick start

import { Button } from "@resq-systems/ui/button";
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@resq-systems/ui/card";

export const MissionCard = () => (
  <Card>
    <CardHeader>
      <CardTitle>Drone 04 — Sector 7</CardTitle>
      <CardDescription>Survey complete · 14 victims geotagged</CardDescription>
    </CardHeader>
    <CardContent>
      <Button variant="default">Dispatch ground team</Button>
    </CardContent>
  </Card>
);

Design system

  • Color — dark-first oklch() palette with semantic tokens (background, foreground, muted, accent, destructive). Light theme is opt-in via data-theme="light".
  • Spacing — Tailwind v4 default scale, with semantic tokens for layout (--space-section, --space-stack).
  • Typography — clamp-based fluid scale (--text-base, --text-hero); two-family pairing (humanist sans + monospace).
  • Motion — compositor-friendly only (transform, opacity); reduced-motion respected.
  • Accessibility — WCAG AA contrast, full keyboard support, focus-visible states on every interactive element. console-fail-test is wired into the test suite, so any rogue console.warn from a missing aria attribute fails CI.

See design/STYLE_GUIDE.md for tokens, typography rules, and component conventions.

Development

bun --filter @resq-systems/ui storybook        # Storybook dev server
bun --filter @resq-systems/ui test             # vitest + @testing-library/react
bun --filter @resq-systems/ui build            # tsdown → lib/
bun --filter @resq-systems/ui lint             # Biome
bun --filter @resq-systems/ui chromatic        # publish visual baseline

Stack

| Layer | Tool | | :--- | :--- | | Primitives | Radix UI | | Styling | Tailwind CSS v4 (oklch tokens) | | Composition | class-variance-authority, tailwind-merge | | Testing | Vitest, @testing-library/react, console-fail-test | | Visual regression | Chromatic | | Build | tsdown |

Prerequisites

  • Runtime: Bun 1.1+ or Node.js 20+
  • Peer Dependencies: react (v19+), react-dom (v19+), tailwindcss (v4+), @radix-ui/* primitives

Configuration

  • Tailwind CSS: Requires Tailwind v4 config inclusion. Import root styles: @import "@resq-systems/ui/styles/globals.css";.

Testing

bun --filter @resq-systems/ui test

Troubleshooting

  • Contrast Failures: The package utilizes dark-first oklch colors. If custom background utilities fail accessibility tests, verify they meet the minimum WCAG AA contrast thresholds using the built-in audit utility.

License

Apache-2.0 — see LICENSE.md.