# Styling vocabulary

<!-- GENERATED by `scripts/gen-consumer-skills.mjs` — do not edit. Regenerate: `npm run consumer:gen` -->

These are the utility names the kit itself is built from, and the only ones
that survive a rebrand and a dark-mode switch. Reach for one of these before
reaching for a literal colour.

## Semantic colours

Each name below is available as `bg-<name>`, `text-<name>`, `border-<name>`, `ring-<name>`, `fill-<name>`, `stroke-<name>`.

| | | | |
| --- | --- | --- | --- |
| `background` | `foreground` | `card` | `card-foreground` |
| `popover` | `popover-foreground` | `tooltip` | `tooltip-foreground` |
| `primary` | `primary-foreground` | `secondary` | `secondary-foreground` |
| `accent` | `accent-foreground` | `muted` | `muted-foreground` |
| `disabled-foreground` | `destructive` | `destructive-foreground` | `success` |
| `success-foreground` | `warning` | `warning-foreground` | `border` |
| `input` | `ring` | `overlay` | `chart-1` |
| `chart-2` | `chart-3` | `chart-4` | `chart-5` |
| `sidebar` | `sidebar-foreground` | `sidebar-primary` | `sidebar-primary-foreground` |
| `sidebar-accent` | `sidebar-accent-foreground` | `sidebar-border` | `sidebar-ring` |

Pairs ending `-foreground` are the legible ink for the surface of the same
name: `bg-primary text-primary-foreground`. Never mix a foreground from one
pair onto a background from another — that is exactly the combination nobody
measured the contrast of.

## Radius, shadow, font

- **radius** — `rounded-2xs`, `rounded-xs`, `rounded-sm`, `rounded-md`, `rounded-lg`, `rounded-xl`, `rounded-2xl`, `rounded-3xl`, `rounded-4xl`
- **shadow** — `shadow-xs`, `shadow-sm`, `shadow-md`, `shadow-lg`, `shadow-xl`
- **font** — `font-sans`, `font-mono`

## Colour palettes

The kit has two independent style axes. `variant` chooses the *treatment*
(how filled it is); `colorPalette` chooses the *hue*. They compose.

Palettes: `primary`, `secondary`, `tertiary`, `third`, `black`, `red`, `green`, `yellow`.

`third` is the deprecated spelling of `tertiary`. It still works and is dropped in the next major — write `tertiary` in new code.

A palette is normally set with the `colorPalette` prop. The underlying class
is `palette-<name>`, and putting it on a container re-tints every kit control
inside it that has not set its own:

```tsx
<div className="palette-red">
  {/* every control in here is red unless it says otherwise */}
</div>
```

## Dark mode

Class-driven, not media-driven: put `class="dark"` on `<html>`. Every name
above re-resolves — an app that used only these needs no dark-mode work of
its own, and an app that hardcoded a colour has a bug that only shows up at
night.

## The vocabulary as values

For a control the app builds itself, `<pkg>/lib` exports the same lists the
kit uses rather than making the app retype them:

```ts
import { colorPalettes, controlVariants, controlHeights, fieldHeights, cn } from '<pkg>/lib';
import type { ColorPalette, ControlVariant, ControlSize, FieldSize } from '<pkg>/lib';
```

`controlHeights` and `fieldHeights` are two different ladders on purpose: a
button and an input at the same named size are not the same height from `md`
up. Read the one that matches what you are building.

