# AI Chat (/blocks/ai-chat)
## Chat Basic [#chat-basic]
```npm
npx shadcn@latest add https://blocks.so/r/chat-01.json
```
## Chat with Model Menu [#chat-with-model-menu]
```npm
npx shadcn@latest add https://blocks.so/r/chat-02.json
```
## Chat Application [#chat-application]
```npm
npx shadcn@latest add https://blocks.so/r/chat-03.json
```
# AI Components (/blocks/ai-components)
## AI Chat with Voice Input [#ai-chat-with-voice-input]
```npm
npx shadcn@latest add https://blocks.so/r/ai-01.json
```
## AI Chat with Model Selection [#ai-chat-with-model-selection]
```npm
npx shadcn@latest add https://blocks.so/r/ai-02.json
```
## AI Chat Compact Interface [#ai-chat-compact-interface]
```npm
npx shadcn@latest add https://blocks.so/r/ai-03.json
```
## AI Chat with File Attachments [#ai-chat-with-file-attachments]
```npm
npx shadcn@latest add https://blocks.so/r/ai-04.json
```
## AI Elements Chat [#ai-elements-chat]
```npm
npx shadcn@latest add https://blocks.so/r/ai-05.json
```
# Command Menu (/blocks/command-menu)
## Command Menu with Groups [#command-menu-with-groups]
```npm
npx shadcn@latest add https://blocks.so/r/command-menu-01.json
```
## Command Menu with Keyboard Shortcuts [#command-menu-with-keyboard-shortcuts]
```npm
npx shadcn@latest add https://blocks.so/r/command-menu-02.json
```
## Command Menu with Documentation Search [#command-menu-with-documentation-search]
```npm
npx shadcn@latest add https://blocks.so/r/command-menu-03.json
```
## Command Menu with Global Search [#command-menu-with-global-search]
```npm
npx shadcn@latest add https://blocks.so/r/command-menu-04.json
```
# Dashboard (/blocks/dashboard)
## Dashboard [#dashboard]
```npm
npx shadcn@latest add dashboard-01
```
## Dashboard with Revenue and Customers [#dashboard-with-revenue-and-customers]
```npm
npx shadcn@latest add https://blocks.so/r/dashboard-01.json
```
# Dialogs (/blocks/dialogs)
## Dialog Confirmation [#dialog-confirmation]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-01.json
```
## Dialog with Warning Icon [#dialog-with-warning-icon]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-02.json
```
## Dialog with Input Field [#dialog-with-input-field]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-03.json
```
## Dialog with Two Buttons [#dialog-with-two-buttons]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-04.json
```
## Dialog with Password Confirmation [#dialog-with-password-confirmation]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-05.json
```
## Dialog with Privacy Toggle [#dialog-with-privacy-toggle]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-06.json
```
## Dialog with Member List [#dialog-with-member-list]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-07.json
```
## Dialog with Email and Password Fields [#dialog-with-email-and-password-fields]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-08.json
```
## Dialog with Link Share and Toggles [#dialog-with-link-share-and-toggles]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-09.json
```
## Dialog with Calendar and Time Picker [#dialog-with-calendar-and-time-picker]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-10.json
```
## Dialog Multi-Step Wizard [#dialog-multi-step-wizard]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-11.json
```
## Dialog with Avatar Upload [#dialog-with-avatar-upload]
```npm
npx shadcn@latest add https://blocks.so/r/dialog-12.json
```
# File Upload (/blocks/file-upload)
## File Upload with Preview [#file-upload-with-preview]
```npm
npx shadcn@latest add https://blocks.so/r/file-upload-01.json
```
## File Upload Simple [#file-upload-simple]
```npm
npx shadcn@latest add https://blocks.so/r/file-upload-02.json
```
## File Upload Multi-File Dropzone [#file-upload-multi-file-dropzone]
```npm
npx shadcn@latest add https://blocks.so/r/file-upload-03.json
```
## File Upload Drag & Drop [#file-upload-drag--drop]
```npm
npx shadcn@latest add https://blocks.so/r/file-upload-04.json
```
## File Upload with Progress [#file-upload-with-progress]
```npm
npx shadcn@latest add https://blocks.so/r/file-upload-05.json
```
## File Upload with Status Sections [#file-upload-with-status-sections]
```npm
npx shadcn@latest add https://blocks.so/r/file-upload-06.json
```
# Form Layout (/blocks/form-layout)
## Form with Workspace Fields [#form-with-workspace-fields]
```npm
npx shadcn@latest add https://blocks.so/r/form-layout-01.json
```
## Form with Side Labels [#form-with-side-labels]
```npm
npx shadcn@latest add https://blocks.so/r/form-layout-02.json
```
## Form with Checkbox Settings [#form-with-checkbox-settings]
```npm
npx shadcn@latest add https://blocks.so/r/form-layout-03.json
```
## Form with Package Selection [#form-with-package-selection]
```npm
npx shadcn@latest add https://blocks.so/r/form-layout-04.json
```
## Form with Plan Selection [#form-with-plan-selection]
```npm
npx shadcn@latest add https://blocks.so/r/form-layout-05.json
```
# Grid List (/blocks/grid-list)
## Grid List with Dropdown [#grid-list-with-dropdown]
```npm
npx shadcn@latest add https://blocks.so/r/grid-list-01.json
```
## Grid List with Links [#grid-list-with-links]
```npm
npx shadcn@latest add https://blocks.so/r/grid-list-02.json
```
## Grid List with Icons [#grid-list-with-icons]
```npm
npx shadcn@latest add https://blocks.so/r/grid-list-03.json
```
# Blocks (/blocks)
Each block is a page plus the components it needs. Preview it at desktop, tablet, and phone widths, read every file, or install it with the shadcn CLI. Blocks from a library credit it at the top of the page and install from the original source.
# Login & Signup (/blocks/login)
## Login [#login]
```npm
npx shadcn@latest add login-03
```
## Login with image [#login-with-image]
```npm
npx shadcn@latest add login-04
```
## Sign up [#sign-up]
```npm
npx shadcn@latest add signup-03
```
## Login with Email and Google [#login-with-email-and-google]
```npm
npx shadcn@latest add https://blocks.so/r/login-01.json
```
## Login with Email, Password and Google [#login-with-email-password-and-google]
```npm
npx shadcn@latest add https://blocks.so/r/login-02.json
```
## Login with Email and Password [#login-with-email-and-password]
```npm
npx shadcn@latest add https://blocks.so/r/login-03.json
```
## Login with Social Buttons [#login-with-social-buttons]
```npm
npx shadcn@latest add https://blocks.so/r/login-04.json
```
## Login Card Signup Form [#login-card-signup-form]
```npm
npx shadcn@latest add https://blocks.so/r/login-05.json
```
## Login with Magic Link and SSO [#login-with-magic-link-and-sso]
```npm
npx shadcn@latest add https://blocks.so/r/login-06.json
```
## Login Full Page with Icons [#login-full-page-with-icons]
```npm
npx shadcn@latest add https://blocks.so/r/login-07.json
```
## Login with SSO [#login-with-sso]
```npm
npx shadcn@latest add https://blocks.so/r/login-08.json
```
## Login Signup with Role Selection [#login-signup-with-role-selection]
```npm
npx shadcn@latest add https://blocks.so/r/login-09.json
```
# Navbar (/blocks/navbar)
## Installation [#installation]
Copy the files above into your app, then add the components they use:
```npm
npx shadcn@latest add button collapsible kbd command
```
The theme toggle needs [`next-themes`](https://github.com/pacocoursey/next-themes). Search is optional: pass `onSearch` to show the search button and bind ⌘ K.
# Onboarding (/blocks/onboarding)
## Onboarding [#onboarding]
```npm
npx shadcn@latest add https://blocks.so/r/onboarding-01.json
```
## Onboarding Workspace Setup [#onboarding-workspace-setup]
```npm
npx shadcn@latest add https://blocks.so/r/onboarding-02.json
```
## Onboarding Steps with Progress [#onboarding-steps-with-progress]
```npm
npx shadcn@latest add https://blocks.so/r/onboarding-03.json
```
## Onboarding Accordion [#onboarding-accordion]
```npm
npx shadcn@latest add https://blocks.so/r/onboarding-04.json
```
## Onboarding Activity Feed [#onboarding-activity-feed]
```npm
npx shadcn@latest add https://blocks.so/r/onboarding-05.json
```
## Onboarding Timeline [#onboarding-timeline]
```npm
npx shadcn@latest add https://blocks.so/r/onboarding-06.json
```
## Onboarding Deploy Pipeline [#onboarding-deploy-pipeline]
```npm
npx shadcn@latest add https://blocks.so/r/onboarding-07.json
```
# Sidebar (/blocks/sidebar)
## Collapsible sidebar [#collapsible-sidebar]
```npm
npx shadcn@latest add sidebar-07
```
## Inset sidebar [#inset-sidebar]
```npm
npx shadcn@latest add sidebar-08
```
## Sidebar Collapsible Sections [#sidebar-collapsible-sections]
```npm
npx shadcn@latest add https://blocks.so/r/sidebar-01.json
```
## Sidebar Dashboard Inset [#sidebar-dashboard-inset]
```npm
npx shadcn@latest add https://blocks.so/r/sidebar-02.json
```
## Sidebar Dashboard Floating [#sidebar-dashboard-floating]
```npm
npx shadcn@latest add https://blocks.so/r/sidebar-03.json
```
## Sidebar Double-Sided Mail [#sidebar-double-sided-mail]
```npm
npx shadcn@latest add https://blocks.so/r/sidebar-04.json
```
## Sidebar Double-Sided [#sidebar-double-sided]
```npm
npx shadcn@latest add https://blocks.so/r/sidebar-05.json
```
## Sidebar Replacement [#sidebar-replacement]
```npm
npx shadcn@latest add https://blocks.so/r/sidebar-06.json
```
# Stats (/blocks/stats)
## Stats with Trending [#stats-with-trending]
```npm
npx shadcn@latest add https://blocks.so/r/stats-01.json
```
## Stats with Borders [#stats-with-borders]
```npm
npx shadcn@latest add https://blocks.so/r/stats-02.json
```
## Stats with Card Layout [#stats-with-card-layout]
```npm
npx shadcn@latest add https://blocks.so/r/stats-03.json
```
## Stats with Badges [#stats-with-badges]
```npm
npx shadcn@latest add https://blocks.so/r/stats-04.json
```
## Stats with Links [#stats-with-links]
```npm
npx shadcn@latest add https://blocks.so/r/stats-05.json
```
## Stats with Status [#stats-with-status]
```npm
npx shadcn@latest add https://blocks.so/r/stats-06.json
```
## Stats with Circular Progress [#stats-with-circular-progress]
```npm
npx shadcn@latest add https://blocks.so/r/stats-07.json
```
## Stats with Circular Progress and Links [#stats-with-circular-progress-and-links]
```npm
npx shadcn@latest add https://blocks.so/r/stats-08.json
```
## Stats with Progress [#stats-with-progress]
```npm
npx shadcn@latest add https://blocks.so/r/stats-09.json
```
## Stats with Area Chart [#stats-with-area-chart]
```npm
npx shadcn@latest add https://blocks.so/r/stats-10.json
```
## Stats Dashboard with Progress Bars [#stats-dashboard-with-progress-bars]
```npm
npx shadcn@latest add https://blocks.so/r/stats-11.json
```
## Stats Usage Dashboard [#stats-usage-dashboard]
```npm
npx shadcn@latest add https://blocks.so/r/stats-12.json
```
## Stats with Segmented Progress [#stats-with-segmented-progress]
```npm
npx shadcn@latest add https://blocks.so/r/stats-13.json
```
## Stats with Usage Breakdown [#stats-with-usage-breakdown]
```npm
npx shadcn@latest add https://blocks.so/r/stats-14.json
```
## Stats with Value Breakdown [#stats-with-value-breakdown]
```npm
npx shadcn@latest add https://blocks.so/r/stats-15.json
```
# Tables (/blocks/tables)
## Table with Accordion [#table-with-accordion]
```npm
npx shadcn@latest add https://blocks.so/r/table-01.json
```
## Table with Actions [#table-with-actions]
```npm
npx shadcn@latest add https://blocks.so/r/table-02.json
```
## Table with Filters [#table-with-filters]
```npm
npx shadcn@latest add https://blocks.so/r/table-03.json
```
## Table with Grouped Rows [#table-with-grouped-rows]
```npm
npx shadcn@latest add https://blocks.so/r/table-04.json
```
## Data Table [#data-table]
```npm
npx shadcn@latest add https://blocks.so/r/table-05.json
```
# Area (/charts/area)
## shadcn/ui [#shadcnui]
Recharts with the shadcn `chart` component. Install `chart` once, then copy a chart from its **Code** tab.
```npm
npx shadcn@latest add chart
```
### Interactive [#interactive]
### Default [#default]
### Gradient [#gradient]
### Stacked [#stacked]
### Step [#step]
## Bklit UI [#bklit-ui]
```npm
npx shadcn@latest add @bklit/area-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/area-chart).
# Bar (/charts/bar)
## shadcn/ui [#shadcnui]
Recharts with the shadcn `chart` component. Install `chart` once, then copy a chart from its **Code** tab.
```npm
npx shadcn@latest add chart
```
### Interactive [#interactive]
### Default [#default]
### Multiple [#multiple]
### Stacked + Legend [#stacked--legend]
### Horizontal [#horizontal]
### Label [#label]
### Negative [#negative]
## Bklit UI [#bklit-ui]
```npm
npx shadcn@latest add @bklit/bar-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/bar-chart).
# Candlestick (/charts/candlestick)
## Installation [#installation]
```npm
npx shadcn@latest add @bklit/candlestick-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/candlestick-chart).
# Choropleth (/charts/choropleth)
## Installation [#installation]
```npm
npx shadcn@latest add @bklit/choropleth-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/choropleth-chart).
# Composed (/charts/composed)
## Installation [#installation]
```npm
npx shadcn@latest add @bklit/composed-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/composed-chart).
# Funnel (/charts/funnel)
## Installation [#installation]
```npm
npx shadcn@latest add @bklit/funnel-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/funnel-chart).
# Gauge (/charts/gauge)
## Installation [#installation]
```npm
npx shadcn@latest add @bklit/gauge-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/gauge-chart).
# Heatmap (/charts/heatmap)
## Installation [#installation]
```npm
npx shadcn@latest add @bklit/heatmap-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/heatmap-chart).
# Charts (/charts)
Charts come from more than one library. Each page is a chart type, and every chart credits the library it comes from and installs from there. Series colors map to the neutral `--chart-1` … `--chart-5` ramp, so charts match the rest of the interface in both themes.
## shadcn/ui charts [#shadcnui-charts]
Built with [Recharts](https://recharts.org) and the shadcn [`chart`](https://ui.shadcn.com/docs/components/chart) component, which maps each series to a CSS variable. Install the component, then copy any chart's code from its **Code** tab.
```npm
npx shadcn@latest add chart card
```
```tsx
const chartConfig = {
desktop: { label: "Desktop", color: "var(--chart-1)" },
mobile: { label: "Mobile", color: "var(--chart-2)" },
} satisfies ChartConfig
} />
```
`ChartContainer` turns each config key into a `--color-` variable, which the series reference. Change a series color in the config, not in the chart.
## Bklit UI charts [#bklit-ui-charts]
[Bklit UI](https://bklit.com) charts are built on visx and Motion, composed from parts (``, ``, ``, ``, ``) and installed from the `@bklit` registry. Their colors come from the `--chart-*` tokens in `global.css`.
```npm
npx shadcn@latest add @bklit/area-chart
```
## Guidelines [#guidelines]
- Do start every series at `--chart-1` and step down the ramp.
- Do reserve status colors (`--success`, `--destructive`) for values that mean good or bad.
- Do hide the vertical grid and axis lines; let the data carry the chart.
- Do keep `accessibilityLayer` on Recharts charts for keyboard and screen-reader access.
- Don't use more than five series in one chart.
## All charts [#all-charts]
# Line (/charts/line)
## shadcn/ui [#shadcnui]
Recharts with the shadcn `chart` component. Install `chart` once, then copy a chart from its **Code** tab.
```npm
npx shadcn@latest add chart
```
### Interactive [#interactive]
### Default [#default]
### Multiple [#multiple]
### Dots [#dots]
### Label [#label]
## Bklit UI [#bklit-ui]
```npm
npx shadcn@latest add @bklit/line-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/line-chart).
# Live line (/charts/live-line)
## Installation [#installation]
```npm
npx shadcn@latest add @bklit/live-line-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/live-line-chart).
# Pie (/charts/pie)
## shadcn/ui [#shadcnui]
Recharts with the shadcn `chart` component. Install `chart` once, then copy a chart from its **Code** tab.
```npm
npx shadcn@latest add chart
```
### Default [#default]
### Donut with Text [#donut-with-text]
### Label [#label]
### Legend [#legend]
### Interactive [#interactive]
## Bklit UI [#bklit-ui]
```npm
npx shadcn@latest add @bklit/pie-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/pie-chart).
# Radar (/charts/radar)
## shadcn/ui [#shadcnui]
Recharts with the shadcn `chart` component. Install `chart` once, then copy a chart from its **Code** tab.
```npm
npx shadcn@latest add chart
```
### Default [#default]
### Multiple [#multiple]
### Dots [#dots]
### Grid Circle [#grid-circle]
## Bklit UI [#bklit-ui]
```npm
npx shadcn@latest add @bklit/radar-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/radar-chart).
# Radial (/charts/radial)
## Default [#default]
## Text [#text]
## Stacked [#stacked]
## Shape [#shape]
# Ring (/charts/ring)
## Installation [#installation]
```npm
npx shadcn@latest add @bklit/ring-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/ring-chart).
# Sankey (/charts/sankey)
## Installation [#installation]
```npm
npx shadcn@latest add @bklit/sankey-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/sankey-chart).
# Scatter (/charts/scatter)
## Installation [#installation]
```npm
npx shadcn@latest add @bklit/scatter-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/scatter-chart).
# Sunburst (/charts/sunburst)
## Installation [#installation]
```npm
npx shadcn@latest add @bklit/sunburst-chart
```
Props and more examples are in the [Bklit docs](https://bklit.com/docs/components/sunburst-chart).
# Tooltip (/charts/tooltip)
## Default [#default]
## Line Indicator [#line-indicator]
## No Indicator [#no-indicator]
## Icons [#icons]
## Advanced [#advanced]
# Components (/components)
This section is for components that go beyond the stock set: ones I've written, and ones from other libraries that I've adopted or adapted. The core shadcn/ui components aren't documented here; they're installed as-is and themed by the [Foundations](/foundations).
## Experiments [#experiments]
[UI SDK formatting pilot](/components/ui-sdk-pilot) is an isolated behavior experiment, not a replacement for the Base UI primitives.
## Libraries [#libraries]
# shadcn/ui (/components/shadcn)
Every core component is the stock shadcn/ui **base-nova** source on [Base UI](https://base-ui.com), themed only through [Foundations](/foundations) tokens. The shadcn docs are the reference; this list links straight to them.
```npm
npx shadcn@latest add button
```
# UI SDK formatting pilot (/components/ui-sdk-pilot)
**Experimental.** This page trials UI SDK's interaction behavior using the catalog's semantic tokens. Existing components continue to use Base UI. The example changes local selection only and introduces no agent bridge or external actions.
## What to try [#what-to-try]
Tab into the group, then use Left/Right to move focus and Space or Enter to toggle an option. Bold starts selected. Multiple selections are allowed. Underline stays discoverable with the arrows, announces why it is unavailable, and ignores activation. Names stay the same when selection changes.
The group wraps at narrow widths and keeps a minimum 44px button height. These are implementation choices awaiting browser inspection, not evidence that every viewport or contrast check passed.
## Reuse decision [#reuse-decision]
For ordinary toggle groups, prefer the existing `src/components/ui/toggle-group.tsx` on Base UI. Both approaches supply grouping, selection and keyboard behavior. The pilot shows how UI SDK can provide these behaviors independently, but does not demonstrate enough benefit to replace an existing primitive library.
Keep an experimental widget self-contained. Nesting a second behavior implementation inside an existing toggle or popup gives both systems ownership of focus and selection. A future custom interaction may justify another evaluation.
## Version and source [#version-and-source]
`@ui-sdk/core` and `@ui-sdk/react` are pinned to `0.1.0-beta.14` (Apache-2.0). The [upstream snapshot](https://github.com/vercel-labs/ui/tree/8060d16d7a9ab3fc79fee25764607344df078c36) declares that version. UI SDK is beta; updates need a review and a rerun of the checks. Follow the installed package's `docs/components/toggle.md` and `docs/server-rendering.md` for the API used here.
The source tab contains the complete local example. Its structure follows the upstream Toggle documentation; typography, spacing, state colors and focus-ring classes use this catalog's tokens. No upstream `web.css` theme is imported.
## Evidence and limits [#evidence-and-limits]
The interaction suite in `tests/ui-sdk-formatting.test.tsx` checks stable names, initial and multiple selection, arrow/Space behavior, discoverable disabled controls that refuse activation, RTL navigation, and server markup hydrating without recoverable errors in jsdom.
The production static build and typecheck also exercise the Next.js client boundary. jsdom hydration is not browser hydration evidence. Browser screenshots, actual contrast, visible focus, large-text overflow, touch behavior and incremental production client-JavaScript cost remain unverified. Do not treat this experiment as production acceptance until the relevant checks are performed in an authorized browser session.
# Colors (/foundations/colors)
The palette is shadcn/ui **neutral** in OKLCH. Each swatch shows the light value on the left and the dark value on the right. Click a swatch to copy its `var()`.
## Surfaces [#surfaces]
The canvas and the layers that sit on it.
## Interactive [#interactive]
Primary actions, secondary actions, and quiet hover states.
## Lines [#lines]
Borders, input outlines, and focus rings. `--border-strong` is for rules that need to hold up next to a `--muted` fill.
## Status [#status]
The only hues in the interface. Use them for meaning, never decoration.
## Charts [#charts]
A five-step neutral ramp, darkest first in light mode and lightest first in dark mode, so the first series always has the most contrast. See [Charts](/charts).
## Sidebar [#sidebar]
## Pairings [#pairings]
Every surface token has a matching foreground. Use them together.
## Usage [#usage]
```tsx
```
- Do use the semantic utilities (`bg-card`, `text-muted-foreground`), not raw palette classes like `bg-neutral-900`.
- Do pair every surface with its foreground token.
- Don't use status colors for emphasis or decoration.
- Don't add gradients.
# Elevation (/foundations/elevation)
Layers in the page get lighter (light mode) or lighter-gray (dark mode) as they come forward, separated by a 1px `--border`. Only floating layers — menus, popovers, tooltips, dialogs — get a shadow.
| Layer | Token | Border | Shadow |
| --- | --- | --- | --- |
| Canvas | `bg-background` | — | — |
| Panel | `bg-card` | `border` | — |
| Inset | `bg-muted` | optional | — |
| Floating | `bg-popover` | `ring-1 ring-foreground/10` | `shadow-md` |
| Modal | `bg-background` | `ring-1 ring-foreground/10` | `shadow-lg` + overlay |
- Don't put shadows on cards that sit in the page flow.
- Don't stack more than three surface steps.
# Foundations (/foundations)
Everything on this site — components, blocks, and charts — is built on [shadcn/ui](https://ui.shadcn.com) and [Base UI](https://base-ui.com) or adopted from libraries like [Bklit UI](https://bklit.com), and themed through one set of CSS variables. The foundations are those variables and the rules for using them.
Read [Reusable patterns](/foundations/patterns) before composing a new screen. It covers state, responsive and interaction expectations.
## Principles [#principles]
- **Tokens, not values.** Use semantic tokens (`bg-card`, `text-muted-foreground`, `border-border`) so both themes work without overrides.
- **Color means something.** The palette is neutral. Color is reserved for status — success, warning, error, information — and for data.
- **Hairlines over shadows.** Separate layers with 1px borders and a step in surface color. Shadows are for things that float: menus, popovers, dialogs.
- **Compose, don't fork.** Build from the components in `components/ui`. If something is missing, compose it from what exists before writing a new primitive.
- **Light and dark are equals.** Both follow the system preference and get the same care.
## Stack [#stack]
| Layer | Library |
| --- | --- |
| Primitives | [Base UI](https://base-ui.com) |
| Components | [shadcn/ui](https://ui.shadcn.com) — `base-nova` style |
| Styling | [Tailwind CSS v4](https://tailwindcss.com) |
| Icons | [Lucide](https://lucide.dev) |
| Charts | [Recharts](https://recharts.org) via the shadcn `chart` component |
| Docs | [Fumadocs](https://fumadocs.dev) |
# Motion (/foundations/motion)
Components animate with [`tw-animate-css`](https://github.com/Wombosvideo/tw-animate-css) utilities driven by Base UI's `data-open` / `data-closed` / `data-starting-style` attributes — `fade-in-0`, `zoom-in-95`, and a small `slide-in-from-*` toward the trigger.
- Do use `ease-out` for things entering and `ease-in` for things leaving.
- Do respect `prefers-reduced-motion` — use `motion-safe:` for anything larger than a fade.
- Don't animate layout on hover.
- Don't exceed 300ms for anything the user is waiting on.
# Reusable patterns (/foundations/patterns)
Start with the destination project's rules and tokens. This catalog's existing [shadcn/Base UI components](/components/shadcn) are the default here; a consumer such as proj keeps its own coss wrappers. Adapt the composition rather than copying an entire block's dependencies or demo content.
## Find and reuse [#find-and-reuse]
Agents can read [/llms.txt](/llms.txt) for the index, [/llms-full.txt](/llms-full.txt) for full content, or an individual page under `/llms.mdx/`. Choose the pattern below, read its component references, and name the states the task changes. Inspect a relevant existing block before inventing a screen; use the project's chosen external catalog when this one has a gap.
| Pattern | Use it for | Starting points | Status |
| --- | --- | --- | --- |
| Actionable rows | A person choosing or opening an item | `src/components/ui/item.tsx`, [tables](/blocks) | Established Base UI/shadcn foundation |
| Editable form | A person entering or changing values | `src/components/ui/field.tsx`, `input.tsx`, `button.tsx` | Established Base UI/shadcn foundation |
| Dialog or sheet | A focused decision or temporary detail | `src/components/ui/dialog.tsx`, `sheet.tsx` | Established Base UI/shadcn foundation |
| Formatting toggles | Independent on/off settings in a compact group | [UI SDK pilot](/components/ui-sdk-pilot) | Experimental; evaluate before reuse |
## Actionable rows [#actionable-rows]
Give the title the space and let secondary metadata yield first. Use one obvious primary target and separately named secondary actions, such as “Actions for Deployment failed”, rather than ambiguous repeated “More” buttons. Choose links for navigation and buttons for actions. Preserve the consumer's existing selection and hover styles.
- **Populated:** a title such as “Deploy dashboard”, its real status, and secondary metadata. Key changing rows by their stable IDs.
- **Loading:** retain the list footprint, mark its region busy, and keep placeholder shapes out of the accessible reading order.
- **Empty:** explain the actual state (“No deployments yet”) and provide a next action only when the product supports it.
- **Error:** say what failed and provide the actual recovery path. Keep already loaded rows if the error was only a refresh failure.
- **Long content:** allow the title to wrap or truncate with an accessible full name. A long repository name must not push the action outside a phone viewport.
Tab reaches each actionable control; Enter follows a link or activates a button. A menu's ordinary arrow/Escape behavior belongs to its primitive. When deleting or reordering removes a focused row, return focus to a surviving nearby control. Check a narrow viewport and large text with both short and long titles; a jsdom test cannot prove overflow or visible focus.
## Editable form [#editable-form]
Use a visible label and associate help/error text with its field. A placeholder is an example, such as `https://example.com`, rather than the field's only name. Keep entered text when saving fails.
| State | Concrete behavior |
| --- | --- |
| Initial | The saved values are present and controls have stable accessible names. |
| Invalid | An empty required name shows a field error, sets `aria-invalid`, and describes the error through `aria-describedby`. |
| Saving | Show progress on the submit control and prevent duplicate submissions. State why any other control is unavailable. |
| Failed | Announce “Could not save changes” with the real reason; keep the draft and allow an explicit retry. |
| Saved | Confirm completion without changing the submit button's accessible name unnecessarily. |
| Unavailable | Disable the relevant control and associate the explanation; preserve readable values. |
Stack fields on narrow screens. Long help and error text should wrap. Test empty submission, correction, pending duplicate submission, failure with retained values, and success through the rendered form. Test Enter submission and ordinary Tab order; compare the visual result separately.
## Dialog or sheet [#dialog-or-sheet]
Use the destination project's wrapper so modality, dismissal and responsive presentation remain consistent. A dialog has a title and a named close/cancel action. Keep critical actions explicit: “Delete group” describes the consequence more clearly than “OK”.
- Open from its real trigger and check that focus enters the intended control.
- Cancel and Escape dismiss without invoking the mutation; closing restores focus to a surviving trigger.
- Confirm once; while pending, prevent a second request. On failure, announce the error and retain the information needed to retry.
- With a long title, body or validation error, keep the actions reachable at phone widths and large text. Let the content scroll where needed.
- A modal contains focus; a deliberately non-modal detail sheet follows the consumer's documented focus policy instead.
A control test proves callbacks, focus and accessible names in that DOM environment. Real-browser checks are still needed for portals, overlays, scrolling, touch, contrast and focus visibility. Honor each repo's authorization rules and record unperformed checks explicitly.
## Provenance and promotion [#provenance-and-promotion]
These recipes describe this catalog's existing Base UI/shadcn foundation and local composition guidance. Component source is in `src/components/ui/`; library credit and canonical upstream references are on [shadcn/ui](/components/shadcn). Experiments carry their own version and evidence. Promote an experiment only after its benefit, interaction checks, browser evidence and dependency cost justify it for the consuming project.
# Radius (/foundations/radius)
`--radius` is **0.5rem (8px)**. The Tailwind `rounded-*` utilities are multiples of it, so changing one variable reshapes the whole system.
```css
@theme inline {
--radius-sm: calc(var(--radius) * 0.6);
--radius-md: calc(var(--radius) * 0.8);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) * 1.4);
--radius-2xl: calc(var(--radius) * 1.8);
}
```
- Do nest radii: an inner element's radius should be the outer radius minus the padding between them.
- Do use `rounded-full` only for things that are round by nature — avatars, badges, switches, status dots.
# Spacing (/foundations/spacing)
Every gap, padding, and margin is a multiple of 4px — Tailwind's default `--spacing: 0.25rem`. Reach for the steps below; anything in between is a smell.
## Layout [#layout]
| Use | Value |
| --- | --- |
| Inside controls | `px-2.5`–`px-3` (10–12px) |
| Inside cards and panels | `p-4`–`p-6` (16–24px) |
| Between related items | `gap-2`–`gap-3` |
| Between groups | `gap-6`–`gap-8` |
| Between page sections | `py-16`–`py-24` |
| Page gutter | `px-4` on phones, `px-6` from `md` |
| Content width | `max-w-6xl` for apps, `max-w-3xl` for reading |
- Do use `gap` on flex and grid parents instead of margins on children.
- Do let density follow context: tighter in tables and menus, looser on marketing pages.
# Theming (/foundations/theming)
### Create a shadcn/ui project with Base UI [#create-a-shadcnui-project-with-base-ui]
```npm
npx shadcn@latest init -b base -p nova
```
### Replace the theme variables [#replace-the-theme-variables]
Copy the `:root` and `.dark` blocks from this site's [`global.css`](https://github.com/timblazing/components/blob/main/src/app/global.css) into your stylesheet, along with the extra `@theme inline` mappings:
```css
@theme inline {
--font-sans: var(--font-geist-sans), system-ui, sans-serif;
--font-mono: var(--font-geist-mono), ui-monospace, monospace;
--font-display: var(--font-sans);
--font-heading: var(--font-sans);
--color-success: var(--success);
--color-warning: var(--warning);
--color-info: var(--info);
--color-border-strong: var(--border-strong);
}
```
### Load the font families [#load-the-font-families]
Install the bundled fonts so builds do not depend on a font CDN:
```npm
npm install geist
```
```tsx title="app/layout.tsx"
import { GeistSans } from "geist/font/sans"
import { GeistMono } from "geist/font/mono"
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
{children}
)
}
```
Apply the font roles in your stylesheet:
```css
@layer base {
html { @apply font-sans; }
code, kbd, pre { @apply font-mono; }
}
.font-display {
font-family: var(--font-display);
font-weight: 500;
letter-spacing: -0.04em;
}
```
### Add components [#add-components]
Anything from [Components](/components), [Blocks](/blocks), or [Charts](/charts) now picks up the theme.
```npm
npx shadcn@latest add button card chart
```
# Typography (/foundations/typography)
## Families [#families]
Both families are bundled by the `geist` package and self-hosted with `next/font/local`. Geist Sans powers UI, body text, component headings, and display titles through `--font-sans`, `--font-heading`, and `--font-display`. Geist Mono powers code, tokens, and chart annotations through `--font-mono`. Every page, including standalone block previews, inherits these fonts from the root layout.
## Scale [#scale]
## Usage [#usage]
```tsx
Foundations
Supporting copy.
96.8%
```
- Do keep display type at weight 500 with tight tracking.
- Do use `tabular-nums` anywhere numbers line up: tables, stats, charts.
- Don't use the display face below 30px or for UI labels.
- Don't use more than two weights in one view.