Theming
Semantic CSS variables. Override those tokens to change the look of the kit without rewriting component classes. The Theme panel and the Theme page share one set of controls for type, heading weight, neutrals, primary, accent, radius, shadow, and mode. They change the preview. The header keeps docs dark mode and the AI prompt.
CSS variables
Importing from agentic-ds-kit loads tokens. Components read semantic vars, not primitive ramps.
Use roles such as --surface-page, --text-primary, and --action-primary. Do not use primitive --color-* ramps in components. Foundations shows the full scale.
Token convention
Primitives are the source ramps. Semantics are the roles components consume.
Light values live on :root. Dark values live on [data-theme="dark"]. Brand hues overlay brand, action, focus, and link roles via [data-color]. Hex in tokens.css is generated from tokens.json — components still only see var().
Theme tokens
These families live in agentic-ds-kit/tokens.css. Override the role, not the component.
| Token | What it controls | Used by |
|---|---|---|
| --bg-canvas / --text-fg | Default app background and body text. --surface-page and --text-primary alias these. | Page shell, body, default copy. |
| --bg-surface / --bg-raised / --bg-floating | White raised surfaces. | Card, Table, Modal, Drawer. |
| --bg-subtle / --bg-tray | Subtle wells and segmented tracks. | Sidebars, code wells, Tabs segmented. |
| --bg-field / --bg-control | Inputs and resting controls. | Input, Select, outline Buttons. |
| --surface-overlay | Scrim behind overlays. | Modal, Drawer, AlertDialog. |
| Token | What it controls | Used by |
|---|---|---|
| --action-primary / --action-on-primary | High-emphasis actions. | Button appearance solid mode primary. |
| --action-primary-hover / --action-primary-pressed | Primary interaction states. | Primary Button hover and press. |
| --action-secondary | Lower-emphasis filled actions. | Secondary Button, supporting UI. |
| --action-danger | Destructive actions. | Danger Button, destructive confirms. |
| --focus-ring / --border-focus | Focus rings and focus borders. | Buttons, inputs, menus, other controls. |
| --border-faint / --border-strong | Default and stronger separators. | Cards, tables, layout dividers. |
| Token | What it controls | Used by |
|---|---|---|
| --status-success / --status-success-subtle / --status-success-text | Success fill, well, and copy. | Badge, Alert, Toast. |
| --status-warning / --status-warning-subtle / --status-warning-text | Warning fill, well, and copy. | Badge, Alert, Toast. |
| --status-danger / --status-danger-subtle / --status-danger-text | Error fill, well, and copy. | Badge, Alert, invalid states. |
| --status-info / --status-info-subtle / --status-info-text | Info fill, well, and copy. | Badge, Alert, informational notices. |
Dark mode
Set data-theme on the document element. The kit does not use a .dark class.
Omit the attribute for light. Pair color-scheme so native controls match. This playground stores the choice in localStorage and applies it before paint.
Brand color
Nistha (Electric Blue on Slate) is the default. Ink, blue, violet, and teal ship as data-color overlays.
Shortcuts: Nistha (unset), ink, blue, violet, teal. Custom writes data-color="custom" and generates primary / hover / active / subtle / focus from any hex. Dark + brand stays a light pair when the picked hex is dark. The Theme page is the live editor.
Font trio
Interface, headings, and mono are separate. The Theme controls write --font-sans, --font-display, and heading weight inside the preview.
Components use the trio, not per-component font cousins. Geist is the default. Heading weight is 400, 500, 550 (default, --font-weight-heading), 600, or 700 on --type-weight-heading. Copy prompt for AI includes each family, the neutral scale, spacing, and shadow intensity.
Radius scale
Semantic radius aliases a primitive scale. Change the primitive to move a whole family.
The scale is fixed on 2 and 4px steps: xs…3xl are 2, 4, 6, 8, 12, 16, 24. Controls use --radius-control-*. Cards and dialogs use --radius-surface-*. Badges use --radius-pill. --radius-base stays 8px and does not move the scale.
Override tokens
After tokens.css loads, reassign semantic roles in your stylesheet. Point them at primitive ramps.
Prefer data-color when blue, violet, or teal is enough. For another hue, override the brand, action, and focus roles together. Do not put hex in React components. If a role is missing from the kit, stop and ask — do not add a one-off.