import { Meta, Source } from '@storybook/addon-docs/blocks'
import { DocHero } from './DocBlocks'
Install one package, add one line of CSS, and every component is ready to use in any React 19 app, with or without Tailwind.
## Requirements
| Dependency | Version | Why |
|---|---|---|
| React and React DOM | 19 | Peer dependency. Components take `ref` as a normal prop |
| Tailwind CSS | 4, optional | With Tailwind, your build generates the utilities; without it, use the prebuilt `styles.css` |
| `@base-ui/react` | 1.8+ | Accessible behaviour: focus management, keyboard navigation, popups. Installed with the package |
| `lucide-react` | 1.x | The icons components draw themselves (chevrons, close, status icons). Installed with the package |
| `clsx` + `tailwind-merge` | 2 and 3 | `cn()` merges class names so your `className` always wins |
## 1. Install
## 2. Add the styles
**With Tailwind CSS v4** (recommended). Import the tokens after Tailwind, and let Tailwind scan the package for the classes it uses:
**Without Tailwind.** Import the prebuilt stylesheet once. It includes the tokens, the utilities the components use, and a modern CSS reset the components rely on:
## 3. Render components
} required />
)
}`}
/>
Every form component takes the same field props, `label`, `description`, `error` and `required`, and links them to the control for screen readers. Values work controlled (`value` and `onValueChange`) or uncontrolled (`defaultValue`).
## Next.js
Components are marked `"use client"`, so you can import them straight into Server Components. Helpers like `cn` and `applyPalette` stay server-safe.
## 4. Dark mode
Add the `dark` class to ``. The surface, border and text tokens switch, and every component and popup follows:
## 5. Pick a palette (optional)
Classic Blue is the default. Apply another palette to any element; everything inside it re-themes, including popups when you apply it to ``:
## Fonts
The Tansy brand uses Schibsted Grotesk for headings, Instrument Sans for text and JetBrains Mono for code, all from Google Fonts. Components inherit your app's font, so these are optional.