UI System

Shared UI primitives define the spec-docs product language across docs, Storybook, API reference, and the authenticated app.

Tokens

@netstamp/ui/styles defines fonts, light and black dark-mode palettes, frame borders, scrollbars, focus behavior, and compatibility utility classes. Import it once at each app root or Astro layout.

ts
import "@netstamp/ui/styles";
import { Button, Panel, MetricCard } from "@netstamp/ui";

Components

The package exports primitives such as Button, Badge, Surface, Panel, MetricCard, MetricTile, SpecCard, SpecLabel, SelectableRow, KeyValueRow, CodePreview, Field, DataTable, Terminal, SignalAvatar, PageShell, and GlobalFooter.

Interaction Frames

Interactive components use one visible frame at a time. Hover and active states use token borders; keyboard focus uses --ns-focus-outline and suppresses the component border where needed so buttons, inputs, tabs, searchable selects, and spec rows do not show stacked borders when selected or focused.

Storybook

The component catalog is built with Storybook and published with the docs site at /storybook/. It includes foundations, component specs, form states, overlay examples, and operational workspace patterns. Run it locally with pnpm --filter @netstamp/ui storybook.