# Picasso — foundations and content Integrated Research's design system. Generated from the repo, which is the source of truth. Generated 2026-11-09. # Content Picasso inherits IR's brand voice. This section covers what changes when that voice has to work inside a product — casing, errors, states, numbers and terminology. **Where this section and IR's brand guidance differ, the brand guidance wins.** Its scope is the company's voice; this section's scope is a UI string. | Page | Answers | |---|---| | [Principles and register](principles-and-register.md) | Why product copy sounds different from marketing copy | | [Casing](casing.md) | Sentence case everywhere, except proper nouns | | [Errors](errors.md) | What broke, then what to do | | [Empty and loading states](empty-and-loading-states.md) | The three states every data component needs | | [Numbers, units and time](numbers-units-and-time.md) | Formatting the thing the product is actually about | | [Buttons and labels](buttons-and-labels.md) | Verb first, name the outcome | | [Terminology](terminology.md) | One word per concept | --- # Buttons and labels > ✗ **Don't** — "Submit" · "OK" · "Click here to export your data as a CSV file" > > ✓ **Do** — "Save changes" · "Delete probe" · "Export CSV" **Buttons.** Say what happens: Save changes, Export CSV, Acknowledge alert. Never "Submit" or "OK" alone. **Destructive actions.** Name the thing and the consequence: Delete probe. Pair it with a confirmation that restates what is lost. **Cancel means abandon.** If the control only closes a panel, say Close. Do not use Cancel for both. **Length.** Two or three words. If a button needs more, the explanation belongs above it, not inside it. See also: [Button guidance](../../packages/ui/src/components/button/guidance.json). --- # Casing **Sentence case everywhere, except proper nouns.** Buttons, labels, hints, headings, menu items, tabs, table headers, badges, empty states and errors. > ✗ **Don't** — "Export Csv" · "View All Alerts" · "TENANT NAME" as a column header > > ✓ **Do** — "Export CSV" · "View all alerts" · "Tenant name" There is no uppercase exception for table column headers. ## Proper nouns Clarion, Iris, Prognosis, Collaborate, Transact, Infrastructure, IR. First mention takes the prefix — IR Collaborate, then Collaborate. **Fixed forms.** UC & CC, HPE NonStop, Real-time Payments. Vendor and protocol names as the vendor writes them: SIP, RTP, MOS, SBC, Teams, Webex. The lowercase wordmarks are graphics, never copy. The product's pre-rename name never appears in a string, file name or alt text. ## The one exception `label/xs` is uppercase with wide tracking. Use it as an **eyebrow or overline** only — chrome that must not read as data. Never on a button. ## Marketing surfaces Brand CTA strings keep their title case: Get a Demo, Contact Us, Watch Video. Product UI does not. A Picasso Button placed on a marketing page takes the brand string. --- # Empty and loading states Writing one state and leaving the other two to the framework is how "No data." ships. Two components exist to put this copy in: **`EmptyState`** takes a `title` and a required `description` — required precisely so the second sentence cannot be skipped — plus an optional illustration, icon and action. **`Skeleton`** is the loading case. Reach for them rather than inventing a one-off; a bare string in a `div` is how the three states drift apart. > ✗ **Don't** — "No data." > > ✓ **Do** — "No alerts in the last 24 hours. Widen the time range to see older activity." **Empty.** Say why it is empty and what would fill it. **First use.** Different from empty. Say what will appear once something is set up, and link to the setup. **Loading.** Prefer a skeleton to a spinner with copy. If a wait can exceed ten seconds, say what is happening. **Partial.** If some data failed, show what loaded and name what did not. Never silently drop a source. --- # Errors Two lines, in that order. > ✗ **Don't** — "You entered an invalid query." > > ✓ **Do** — "No results match these filters. Clear the date range to widen the search." **Line one is the fact.** What broke, and what it affects. Name the thing, not the layer it failed in. **Line two is the action.** What the reader can do now, or who can. If there is nothing to do, say what happens next and when. **Never blame the reader.** The filter returned nothing; the person did not fail. Avoid "you entered", "invalid" and "illegal". **No dead ends.** An error with no next step is an unfinished error. --- # Numbers, units and time > ✗ **Don't** — "three trunks" · "1.2GB" · "45ms" · "2:15pm" · "MOS 3.60000" > > ✓ **Do** — "3 trunks" · "1.2 GB" · "45 ms" · "14:15 AEST" · "MOS 3.6" **Numerals always.** Use digits, including one to nine. **Units.** A space between value and unit: 1.2 GB, 45 ms, 12 kbps. Percentages close up: 99.95%. **Precision.** Match precision to the decision. MOS to one decimal, packet loss to two, counts whole. Do not pad with zeros. **Time.** 24-hour clock with an explicit timezone. Relative under an hour, absolute after. **Ranges.** En dash, no spaces: 09:00–17:00. --- # Principles and register ## The three principles, applied to a UI **Solve problems for people, not processors.** Write about the situation someone is in, not the system that produced it. Use the words they already use. **Cool, calm and objective.** State what happened. No alarm, no apology, no exclamation marks. **Proactive, not reactive.** Lead with what someone can do next, not with what the product just did. > ✗ **Don't** — "Oops! We couldn't load your data. Please try again later." > > ✓ **Do** — "Couldn't reach the Sydney probe. Retrying every 30 seconds." ## Register Same voice, less of it. Brand and product are not two personalities — they are one personality at two volumes. > ✗ **Don't** — "Uh oh! Something's not quite right — but don't worry, we're on it." > > ✓ **Do** — "MOS dropped below 3.6 on 12 trunks." **Why it differs.** Brand copy persuades someone who chose to read it. A UI string informs someone in the middle of a task, often during an incident. **What stays.** Plain words, active voice, "you" and "yours", and the most important thing first. **What goes.** Benefit framing, reassurance, exclamation marks, and explaining the reader's own domain back to them. **Who is reading.** Usually an engineer who knows UC and CC better than we do. Explain our concepts, never theirs. --- # Terminology > ✗ **Don't** — a screen that says "tenant" in the header, "customer" in the table and "org" in the filter. > > ✓ **Do** — one term, chosen once, used in all three. **Pick one and hold it.** tenant, customer, organisation and site are not interchangeable. Choose one per concept and use only that word. **Explain our concepts.** Say what Clarion means by a probe, a threshold, a fleet. These are ours, so they need defining. **Never explain theirs.** Assume SIP, jitter, MOS, SBC and packet loss need no gloss. ## One word has no answer yet **Tenant**, **customer** and **organisation** all appear, and none of them is the agreed word. Do not pick one in a draft — use whichever the surrounding screen already uses, and flag it in review so the choice is made once rather than per screen. --- # Foundations | Page | What it covers | |---|---| | [Tokens, brands and Figma sync](tokens-and-brands.md) | How a token is built, how a brand chooses, how Figma is kept matching | | [Grid, spacing and radius](grid-spacing-and-radius.md) | A 4pt grid with 2pt half-steps, and one knob for every corner | | [Typography](typography.md) | Five roles, 21 steps, three weight tiers | | [Colour](colour.md) | Three semantic families, one utility word each | | [Elevation](elevation.md) | Five shadow steps and six layers | | [Motion](motion.md) | What animates, and what deliberately does not | | [Right-to-left](rtl.md) | Arabic, Hebrew and Persian: what mirrors, what must not, and how to set it up | | [Icons](icons.md) | Lucide, sized by the parent, hidden unless it is the label | | [Accessibility](accessibility.md) | WCAG 2.1 AA as a build gate | Every number on these pages comes from `packages/tokens/`. If one disagrees with a token, the token is right and this page is stale — raise it. --- # Accessibility ## The gate is 2.1 AA, and it runs in CI `npm test` measures **every on-colour pair in the system, in both modes, for every brand** — 24 pairs per brand — and fails the build below 4.5:1. Body text is checked on `bg/app` and `bg/card`. The focus ring is checked at 3:1, because a focus indicator is a UI component and SC 1.4.11 asks for 3:1 rather than 4.5:1. A brand's ramp and its on-colours are generated, so the gate is what proves the generator right. It also asserts that it found 24 pairs: a token renamed out of coverage is a gate that passes while checking nothing. A brand colour is never rejected for being light. `fg/on/*-emphasis` is measured per brand and per mode: white where white carries, `palette/neutral/950` where it does not. The gate only fires when neither ink reaches 4.5:1 on that surface — see [Colour](colour.md). The standard is WCAG 2.1, not APCA. **Comply with 2.1, and where 2.1 says pass and the screen says otherwise, darken.** Never the reverse — the eye overrides upward only. ## Focus is a ring, and the ring is the only indicator `packages/tokens/theme.css` sets `:focus-visible { outline: none }` globally. That means a component with no `shadow-ring-focus` has **no visible focus at all** — there is no browser outline underneath to fall back on. ```tsx "outline-none focus-visible:shadow-ring-focus" ``` `shadow-ring-focus` is two rings: 2px of the page background, then 2px of brand. The inner ring is the offset, and it is what makes the indicator read on a card, on a toolbar, and on a coloured surface alike. See [Elevation](elevation.md) for why it lives in the shadow namespace. Keep the ring independent of the border. Switch is the pattern: its track border goes transparent when the switch is on, and the focus ring is a separate layer that is unaffected. The border is decoration; the ring is the indicator. ## Invalid: boxes take a border, marks take a ring | Control | Treatment | |---|---| | Input, Select, Textarea, Number, Password — anything in an `InputGroup` | `has-[[aria-invalid=true]]:border-line-input-invalid` on the group | | Checkbox, Radio, Switch | `aria-invalid:shadow-ring-focus-danger` | A box already has a border, so invalid recolours it. A mark has no border to recolour, so it gets a ring instead — and a checked checkbox keeps its fill while the ring carries the error. One mechanism per shape, decided once. ## Disabled contrast is 2.24:1 on purpose SC 1.4.3 exempts disabled controls, and the low contrast **is** the signal. Do not "fix" a disabled state to 4.5:1; it would then read as available. ## Motion Every animation honours `prefers-reduced-motion` — and honouring it means substituting, not deleting. A spinner that stops spinning looks broken. See [Motion](motion.md). ## Icons Decorative icons take `aria-hidden`. An icon-only button takes `aria-label`, because the icon sizes have no text child by definition and a screen reader announces nothing without it. See [Icons](icons.md). ## Per-component notes live with the component Each component's `guidance.json` carries an `a11y` array — the things an agent or a reviewer cannot infer from the `.tsx`. Button's says the focus ring is never removed, that `loading` sets `aria-busy` and must not stay activatable, and why its disabled contrast is 2.24:1. Those notes are published to `/llms-components.txt`, so they reach a model writing code as well as a person reading Storybook. **A component is not finished until its `a11y` array says something true.** --- # Colour ## Never a raw value ```tsx // ✗ never className="bg-[#007FAB] text-[#121926]" className="bg-blue-600" // no Tailwind palette colours className="bg-[var(--bg-primary-emphasis)]" // the escape hatch is not needed // ✓ always className="bg-surface-primary-emphasis text-content-neutral-emphasis" ``` **Never use a `palette/*` value in a component.** Palette exists to feed semantics; semantics are what components consume. ## Three families, three words Tailwind v4's `--color-*` namespace feeds `bg-`, `text-` and `border-` from one pool, so the three token families would collide on a shared name. Each gets a word that reads correctly with its own prefix: | Token family | Utility word | Example | |---|---|---| | `bg/*` (69) | **surface** | `hover:bg-surface-danger-subtle-hovered` | | `fg/*` (31) | **content** | `text-content-on-primary-emphasis` | | `border/*` (21) | **line** | `border-line-input-invalid` | | `status/*` (5) | status | `text-status-critical` | | `chart/1–6` | chart | `fill-chart-3` | Every semantic has a utility. **If you reach for `bg-[var(...)]`, the bridge is missing an entry** — add it to `packages/tokens/theme.css` rather than escaping. ## The chart series palette `chart/1–6` is a **series** palette, not a brand palette. They are different jobs: a brand palette is chosen so the colours belong together, a series palette so they can be told apart. IR's brand colours do not automatically do the second. Six slots, in fixed order — brand blue, IR red, indigo, IR purple, amber, pink. **The order is fixed and never cycled.** A seventh series is not a generated hue: fold the tail into one "Other", or use small multiples. Three colours are deliberately *not* series slots, and all three are still colours you can use elsewhere: | Colour | Why not a series | |---|---| | IR corporate blue | 7° from brand blue on the hue wheel — the same colour to anyone reading a chart | | IR lime | 20° from lime, and at L 0.85 it is outside the usable band in both modes; it has no in-range step | | teal | cannot clear blue in both light and dark at once | The steps come from `palette/vis/*`, which is referenced by `chart/*` and nothing else — so those ramps are tuned to pass the categorical checks rather than to match a brand swatch exactly. The whole set is validated in both modes against every pair, not just adjacent ones. Two residual warnings, both deliberate and both covered by the chart components: - **Amber and IR red separate by only ΔE ~7 under protanopia and deuteranopia.** That is inside the floor band, which is legal only with a second channel. The chart components always draw a legend from two series up, always carry a data table, and name every series in the tooltip. If you build a chart that does none of those and uses both slots, direct-label the lines. - **IR purple and pink fall below 3:1 against the dark card** (2.38 and 2.82). Same cover: a visible legend and a table. They clear 3:1 on the app surface. ## The chart scale `chart/1–6` carry **identity**. `chart/scale/1–5` carry **magnitude**, and the two never mix: the categorical slots are chosen to be maximally unlike each other, which is the opposite of what an ordered scale needs. One hue, five bands, from IR corporate blue. That hue was free: it had been a series slot until the re-step found it 7° from brand blue — the same colour to anyone reading a chart — so it carries no categorical job, it is the same in every brand, and it is not a status colour. | | Light | Dark | |---|---|---| | `chart/scale/1` | `ir-corporateblue/200` | `ir-corporateblue/950` | | `chart/scale/2` | `/400` | `/700` | | `chart/scale/3` | `/600` | `/500` | | `chart/scale/4` | `/800` | `/300` | | `chart/scale/5` | `/950` | `/50` | **Light runs light to dark; dark runs dark to light.** Nothing can sit below the surface it is drawn on, so in dark mode the quiet end has to be the dark end. A scale flipped from the light one would put the loudest cells nearest the background and the calmest ones shouting. The bands were picked by measuring, not by eye: the most even lightness spread the ramp allows, subject to the quietest band staying separable from the card behind it. Light lands on min adjacent ΔE 14.0 with the lowest band ΔE 13.1 from white; dark on min adjacent ΔE 17.7 with the lowest band ΔE 10.5 from the card. **Five bands, not a gradient.** Nobody reads a colour back to a number off a smooth ramp; they read it to a band and look that band up. Banding makes the legend honest and makes two cells of the same severity the same colour. Only `Heatmap` uses this today, and it is the one chart that colours by value — a cell has no length or height to encode with, so colour is the only channel it has. Anywhere a mark has a length, the length carries the magnitude and colour goes back to carrying identity. ## How a token is named ``` bg / danger / subtle / hovered │ │ │ └── state: hovered · pressed · (none = resting) │ │ └── prominence: emphasis · subtle · muted │ └── intent: primary · neutral · danger · success · warning · info └── family ``` `fg/on/` is the foreground guaranteed to pass contrast on that surface — `text-content-on-primary-emphasis` sits on `bg-surface-primary-emphasis`. ## The neutral ramp runs subtle → muted → emphasis Prominence is contrast: **subtle** is the quietest fill, **muted** is one palette step stronger, **emphasis** is the solid. `bg/neutral` has the same shape as `bg/primary`, `bg/danger` and the other status ramps (50 → 100 → 600 there; 50 → 100 → 800 here), and hover and pressed are one and two steps further on. | Light | rest | hover | pressed | |---|---|---|---| | `bg/neutral/subtle` | 50 | 100 | 200 | | `bg/neutral/muted` | 100 | 200 | 300 | | `bg/neutral/emphasis` | 800 | 900 | 950 | | `bg/sidebar` | 100 | 200 | 300 | | Dark | rest | hover | pressed | |---|---|---|---| | `bg/neutral/subtle` | 800 | 700 | 600 | | `bg/neutral/muted` | 700 | 600 | 500 | | `bg/neutral/emphasis` | 100 | 50 | white | | `bg/sidebar` | 950 | 900 | 800 | Until 2 Oct 2026 light `muted` was white and dark ran 950 then 900 — muted was lighter than subtle in light, and in dark the order ran away from contrast. **What each step is seen on.** The page is neutral-50 in light and 900 in dark; a card is white and 800. | | on the page | on a card | |---|---|---| | `subtle`, light | matches it (1.00) | faint (1.05) | | `subtle`, dark | shows (1.21) | matches it (1.00) | | `muted` | shows in both themes | shows in both themes | | every hover and pressed | shows | shows | So `subtle` matches one surface in each theme and shows on the other; `muted` is the first step that is seen everywhere. Before the change nine hover and pressed states were invisible on one surface in dark (a ghost button's hover on a card, a menu item's focus and a table row's hover on the page); none are now. **A resting fill that has to be seen takes `muted`.** Secondary Button, the subtle neutral Badge, Avatar's fallback, Kbd, the active Tab, a read-only Input or Textarea, the Table header, Select's count, File upload's icon tile and the Stepper's current number all rest on `bg/neutral/muted`, so they show on the page and on a card in both themes (1.08 / 1.12 in light, 1.71 / 1.42 in dark). Secondary Button hovers and presses along the muted ladder. Two things follow and are accepted: an active Tab is the same fill as a hovered one, and a Table header is the same fill as a hovered row — text weight and position tell them apart. The Stepper's *incomplete* number stays on `subtle`: its text is `fg/neutral/subtle`, which on the muted fill falls to 2.2:1 in dark. `subtle` is left for hover (`subtle-hovered`, `-pressed`) on things that are transparent or card-coloured at rest. **A fill that should match the card takes `bg/card`**, not a neutral step. The outline Button, a selected Chip, the outline Badge, the Avatar add button and the Stepper's empty indicator all rest on `bg/card` and hover through `bg/neutral/subtle-hovered` and `-pressed`. Light is pixel-identical to before. **Anything on the sidebar takes `bg/sidebar-hovered` and `bg/sidebar-pressed`**, never the neutral pair. The rail is neutral-100 in light, which is what `bg/neutral/subtle-hovered` and `bg/neutral/muted` resolve to — a hover that equals its surface cannot render. ## Tracks and skeletons take `bg/layer/*` `bg/layer/*` is a translucent tint of the ink colour (white in dark), so it runs in contrast order and reads the same on the page, on a card and on a tinted panel. It is for neutral fills that are part of a picture rather than a control: tracks, empty segments, skeletons, wells. | Contrast with what is behind it | subtle | muted | emphasis | |---|---|---|---| | Light | 1.08 | 1.17 | 1.34 | | Dark | 1.14–1.17 | 1.33–1.38 | 1.75–1.80 | Thin things take `emphasis` (Progress, Slider and File upload tracks, Meter's empty segments); large areas take `muted` (Skeleton). **Never use a state token for a resting fill.** `-hovered` and `-pressed` describe an action. If a pressed token is the only one that shows, the element wants `bg/neutral/muted` or `bg/layer/*`. ## Dark mode is free Semantics alias primitives, and **dark mode overrides semantics** while the theme axes override *primitives*. That asymmetry is what lets five axes and two modes compose by cascade instead of being authored as ten sets. A component that uses semantic utilities gets dark mode without a single `dark:` class. ## Brands Picasso is multi-brand: a brand supplies its own brand and accent ramps and inherits everything else. ## A surface does not have to carry white `fg/on/*` is measured, never chosen. For every `bg//emphasis`, the build asks which ink reaches 4.5:1 on it and writes that one: white where white carries, `palette/neutral/950` where it does not. | Surface | `fg/on/*-emphasis` becomes | At | |---|---|---| | `#007FAB` | white | 4.54:1 | | `#F59E0B` | neutral-950 | 9:1 | | `#A3E635` | neutral-950 | 12.82:1 | | `#FFD60A` | neutral-950 | 13.69:1 | So a brand colour is never rejected for being light. It gets dark ink, and the button is still a button. This is the one semantic that may differ per brand — everything else aliases a primitive, so re-pointing `--palette-brand-600` carries the whole system with it. **If a brand seems to need some other semantic overridden, the ramp is wrong.** A generated ramp rarely needs the flip at the steps a button is painted with: lightness comes from a fixed ladder, so 600–950 land dark enough to hold white whatever the hue, and the base colour contributes hue and chroma. The flip is what carries a **pinned** ramp — eleven stops supplied by Marketing, where any value is possible — the lighter steps, and status colours like amber. The one real failure is a surface that neither ink reaches: white below 4.5:1 *and* neutral-950 below 4.5:1. That colour has to move, and `npm test` says so. `npm test` measures every on-colour pair against its own surface, in both modes, for every brand — so a ramp that drifts a step lighter fails the build rather than an audit. See `AGENTS.md` → Adding a brand. ## ⚠️ Unresolved: the brand ramp **All eleven brand stops disagree between Figma and the repo**, and the repo is probably right — IR's own note records `brand.600` as `#007FAB`, the repo's value. Until Marketing settles it, treat published brand hexes as provisional. Everything else in this page is stable. --- # Elevation Picasso separates two things most systems bundle together. **Shadow** says how far a surface sits off the page. **Layer** says what covers what. A component usually needs one or the other, and a few need both. ## Layers Six rungs. Every one of them is a token in `core.json` under `layer/*`, and a utility in `theme.css`. ![The six Picasso layers, from the page at 0 up to notification at 3200](/diagrams/foundations/elevation-layers.svg) | Token | Value | Utility | |---|---|---| | `layer/base` | 0 | — the page is already 0 | | `layer/raised` | 100 | `z-raised` | | `layer/overlay` | 800 | `z-overlay` | | `layer/modal` | 1600 | `z-modal` | | `layer/floating` | 2000 | `z-floating` | | `layer/notification` | 3200 | `z-notification` | The gaps are the point: anything that needs to sit between two rungs has room to, without renumbering what is already there. ### Floating outranks modal A tooltip, popover, select menu or dropdown is portalled to the document body. One opened from inside a dialog is no longer inside it, so it has to carry a layer that clears the dialog — otherwise the menu you just opened is behind the thing you opened it from. Floating is therefore above modal, not below it. ### The scrim is below the thing it dims `overlay` at 800 sits under `modal` at 1600, so a dialog covers its own scrim by number rather than by which of them the browser paints first. ### Reaching a layer Use the utility. `z-[1600]` is refused by `no-arbitrary-values`, and a bare `z-50` is a number outside the system. A rung that does not exist yet is added to `layer/*` in `core.json` and given an `@utility` in `theme.css`; Tailwind has no `--z-index-*` namespace, so layer utilities are written out rather than generated from the theme. ## Shadows Five steps. Each is two drop layers and an inset, generated from `_shadow/*` in `light.json` and `dark.json`. Figma's effect styles bind to the same colours. | Step | Carries | |---|---| | `shadow-xs` | Card, Kbd, Slider — a resting surface lifted off the page | | `shadow-sm` | Switch, Tabs, ThresholdSlider — a small raised affordance | | `shadow-md` | DropdownMenu, Select, Toast, Overlay | | `shadow-lg` | Drawer, Popover, Overlay | | `shadow-xl` | The deepest step, for a surface above all of those | Overlay appears twice because its variants carry different depth, and Dialog takes its shadow from Overlay rather than setting one. Four more belong to the embeddable widget — `shadow-widget-panel`, `-notification`, `-screen`, `-smooth`. They carry that product's depth rather than the system's. ### Light and dark carry depth differently In light mode a shadow is a drop shadow: near-black at 4–12% over two layers, with the inset fully transparent. In dark mode the drop layers run at 40–60% of pure black, and the inset becomes a visible white top highlight — from `#FFFFFF0A` at `xs` to `#FFFFFF14` at `xl`. Depth in dark mode is carried as much by the lit top edge as by the shadow beneath. The token knows both. A hand-written shadow does not. ### Focus rings share the namespace A focus ring is a composite too, so it lives with the shadows: `shadow-ring-focus`, `shadow-ring-focus-danger`, `shadow-ring-focus-inset`. `ring-focus` is two rings. The inner 2px is the page background — neutral-50 in light, neutral-900 in dark — and the outer 2px is brand. The inner ring is the offset, and it is what makes the indicator read on a card, a toolbar and a coloured surface alike. Which control takes a ring and which takes a border is in [Accessibility](accessibility.md). ## Where the values are `layer/*` in `packages/tokens/tokens/core.json`; `_shadow/*` and `shadow/*` in `light.json` and `dark.json`; the utilities in `packages/tokens/theme.css`. Resolved values for both modes are in `/llms-tokens.txt`. --- # Grid, spacing and radius ## The grid **Picasso is a 4pt grid with 2pt half-steps.** Legal values are every multiple of 4, plus 2, 6, 10 and 14. Anything else — 5, 13, 18 — is drift. ## Spacing The primitive scale is **Tailwind's, unmodified**: `--space-1` is `0.25rem` and the ladder runs 0 → 96. Engineering inherits it for free, and Tailwind's own `--spacing` is fed from that single number, so every `px-`, `gap-`, `h-` and `w-` utility derives from one value. ```css --spacing: var(--space-1); /* 0.25rem */ ``` Every ladder step is also a **named** Tailwind key (`p-4` reads `--space-4`), so a brand or preset can move the whole ladder at once. The spacing presets — `compact` ×0.875 and `relaxed` ×1.25 — scale every step and round it to the 2px grid (`space/4` is 14 · 16 · 20px). See [Tokens, brands and Figma sync](tokens-and-brands.md). **Do not pick from all 35 steps.** Eight do the real work: | Step | px | Used for | |---|---|---| | `0.5` | 2 | hairline offsets | | `1` | 4 | tightly related lines — label to hint | | `1.5` | 6 | icon to label inside a small control | | `2` | 8 | icon to label, inside a control | | `3` | 12 | control padding | | `4` | 16 | between labelled groups, container padding | | `6` | 24 | page gutters | | `8` | 32 | between page sections | `space/36`–`space/96` (144–384px) are layout measurements, not component spacing. They stay in the repo and are scoped out of Figma's pickers. ## Radius **Radius is one knob.** `--radius` drives all eight steps proportionally, so a theme changes one number rather than eight. ```css :root { --radius: 0.625rem; } /* 10px */ [data-radius="sharp"] { --radius: 0; } [data-radius="subtle"] { --radius: 0.375rem; } /* 6px */ [data-radius="rounded"] { --radius: 1rem; } /* 16px */ ``` At the default theme that resolves to: | Utility | Derivation | px | Used by | |---|---|---|---| | `rounded-xs` | `--radius × 0.2` | 2 | nested elements inside a control | | `rounded-sm` | `× 0.6` | 6 | checkbox, small indicators | | **`rounded-md`** | `× 0.8` | **8** | **Button, Input, Select, Tabs, Chip** | | `rounded-lg` | `× 1` | 10 | — | | `rounded-xl` | `× 1.4` | 14 | Card, Dialog, Popover, Drawer | | `rounded-2xl` | `× 1.6` | 16 | marketing blocks | | `rounded-3xl` | `× 2.4` | 24 | — | | `rounded-4xl` | `× 3.2` | 32 | — | | `rounded-full` | — | — | Badge, Avatar, Switch track, status dot | **Never hard-code a corner.** A literal `rounded-[8px]` survives the default theme and breaks every other one. > ⚠️ This ladder is **shadcn's**, not Tailwind's. Tailwind's is 2/4/6/8/12/16; > ours derives from the single `--radius` knob, which is what makes radius > themeable. The Figma `radius/*` variables carry the same eight numbers. --- # Icons ## One library **Lucide, and nothing else.** A second icon library means two stroke weights, two grid sizes and two ideas of what a chevron looks like, and the seam shows in every toolbar. In Figma the library is the `Lucide Icon/*` component set, and the name maps straight through: `Lucide Icon/AArrowDown` is ``. There is nothing to translate. ## The parent sets the size Icons are sized by the component that holds them, not by the icon: ```tsx // ✓ the control owns the size "inline-flex items-center gap-2 [&_svg]:size-4" // ✗ not on each icon ``` Three sizes, and that is the whole scale: | Size | px | Where | |---|---|---| | `size-4` | 16 | The default — buttons, menu items, inputs, almost everything | | `size-3.5` | 14 | Dense controls where 16 crowds the text | | `size-3` | 12 | Inline marks inside a small control | A size outside this set is outside the system. ## Stroke weight is Lucide's, with one exception Never set `strokeWidth` — except on a check mark, which takes `strokeWidth={3}`. At 12–16px a tick drawn at Lucide's default 2 reads as a smudge rather than a confirmation, and it is the one glyph where that matters. ## Every icon is hidden unless it is the label ```tsx // decorative — the text beside it already says this // the only thing there — the button needs a name ``` A screen reader announcing "image" between every menu item and its text is noise. An icon-only button with no `aria-label` announces nothing at all. Both are in [Accessibility](accessibility.md). ## Direction Icons that encode direction — chevrons, arrows, back and forward — mirror in RTL. Clocks, check marks, logos and media controls do not: a clock running backwards is wrong in every locale, and a play triangle points at the timeline, not at the reading order. The mechanism is `.rtl-mirror`, defined in `packages/tokens/theme.css`: ```css [dir="rtl"] .rtl-mirror { transform: scaleX(-1); } ``` Put it on the icon itself, not on a wrapper — the transform mirrors the glyph, not the space around it. An Accordion chevron, a Breadcrumb separator and a Drawer's back arrow all take it. --- # Motion, before and after The rules in [Motion](motion.md) are easier to believe when you can watch them. Each one here is a pair: the wrong way on the left, what Picasso does on the right, and one button that plays both at once. Turn on **Slow motion** to run both sides five times longer. Most of these differences are a few frames long, and that is the point — they are felt before they are seen. Three of the left-hand sides are not invented. They are what Picasso itself did until 7 October 2026, and they are marked. Reading this on GitHub, the examples do not play. They are on the docs site, and in Storybook under **Foundations / Motion before and after**. ## Data does not move for style **Before** — `Count-up over 1.2s, bars grow over 800ms`. **Now** — `No animation`. The value is there when the tile is. This is the first question for anything that might move — should it move at all — and for data the answer is no. Someone opens a dashboard to read a number: is the fleet healthy, how many trunks are down. For the first second, a tile that counts up shows numbers that are not true. A quarter of a second in, the example reads about 780 trunks reporting; the answer is 1,284. On a monitoring console it is worse than slow, because here movement means change. A bar that is growing reads as a metric that is rising. And it does not happen once: it replays on every load, every filter and every refresh, to someone who is on this screen all day. So charts, KPI tiles, sparklines and meters appear with their values, and a value that updates changes at once. ## Nothing starts slowly **Before** — `In 200ms cubic-bezier(0, 0, 0.2, 1), out 150ms cubic-bezier(0.4, 0, 1, 1)`. Picasso's Dialog did this until 7 October 2026. **Now** — `animate-dialog-in, animate-dialog-out`. Both decelerate on `motion/easing/out`: 200ms in, 150ms out. Watch the first moment after Close. The old closing curve was an ease-in: it starts slowly and leaves at speed. That sounds right for something going away, and it is wrong for a reason you can measure. A third of the way through its time, the old close had covered about a sixth of the distance. The new one has covered seven eighths. Those first frames are the ones that matter. They come straight after the click or the Escape, when the person is looking at the dialog and waiting for it to answer. An ease-in spends them barely moving, so the dialog seems to hesitate before it goes. Leaving still feels quicker than arriving. It does that by taking the shorter step — 150ms against 200 — not by accelerating. There is no ease-in anywhere in the system now, and a test fails if one is added. ## Nothing appears from nothing **Before** — `scale(0) to scale(1)`. **Now** — `animate-popover-in: scale(0.96) and a fade`. Both sides take the same 150ms on the same curve. The only difference is where they start. From zero, the panel passes through every size on its way to full size, so what the eye follows is the growing — a shape flying outwards — and the words inside cannot be read until it stops. Closing is the same in reverse: the menu shrinks to a dot, and the dot is where the eye is left. From 96%, the panel is already its own shape in its own place. The fade does the arriving. The scale is only there to give it a direction. ## An anchored panel grows from its trigger **Before** — `transform-origin: center`. **Now** — `transform-origin at the trigger`. On a real component that is the origin Radix publishes, such as `origin-(--radix-popover-content-transform-origin)`. This one is small on purpose. Four percent of a menu is a few pixels, so turn on slow motion to see it. From its centre, a menu appears beside its button. From the corner nearest the trigger, it comes out of the button. That is what ties a panel to the control that opened it, and it matters most in a toolbar or a table, where several similar buttons each have a menu of their own. It applies to Popover, Dropdown menu, Select's menu and Tooltip. A Dialog is the exception: it is centred on the page and anchored to nothing, so it scales from its centre. ## 300 is the ceiling **Before** — `500ms ease-in-out, both ways`. **Now** — `animate-drawer-in-end, animate-drawer-out-end`. 300ms in and 200ms out, on `motion/easing/drawer`. Half a second each way is a second of waiting for every look, and a drawer is opened dozens of times in a shift. The curve does more than the number. A tenth of a second in, the slow drawer has moved about 8% of the way. The Picasso drawer has moved 88%, because the sheet curve covers most of the distance at once and spends the rest settling. It can be read almost as soon as it is asked for. Nothing in the interface takes longer than 300ms. The scale has three durations — 150, 200 and 300 — and it is closed: a request for a fourth is a request to make something slower. ## Only transform and opacity move **Before** — `transition: width 200ms`. Picasso's Sidebar did this from 2 to 7 October 2026. **Now** — `No transition`. The rail changes width at once. Each example counts how many times the page beside the rail changed size. Animated, it is about twelve — once for every frame of the transition. Changed at once, it is one. In the example the page is four empty boxes, so twelve resizes cost nothing. In Clarion it is charts and tables. Every one of those resizes is every chart measuring itself and drawing again, twelve times, for a transition nobody asked to watch. `transform` and `opacity` do not touch layout, which is why everything else that moves in Picasso moves on those two. There is no transform that makes a rail narrower without squashing what is in it, so the rail does not animate. The one exception is the Accordion's height. Nothing else opens a row, the height is measured rather than guessed, and it is kept to 200ms. ## A press, not a hover **Before** — `hover: scale(1.05), nothing on press`. **Now** — `transition-press, active:scale-97`. Hover changes colour; a press scales the control to 97%. There is no play button here. Move across each button, then press and hold it. Hover is not a decision. On a dense screen the pointer crosses a dozen controls on its way to the one it wants, and each of them would twitch as it passed. A control that grows also moves its own edges under the pointer and leans into its neighbours. And a finger has no hover at all. A press is a decision, and it deserves an answer. The button gives 3% for as long as it is held, and the label and icon go with it — that is what makes it read as a press and not as a colour change. `Button` and a pressable `Chip` do this. A text link does not, and neither does a button inside a `ButtonGroup`, where one member pulling away from its neighbours looks like the group coming apart. ## Reduced motion is a fade **Before** — `No animation`. Picasso did this until 7 October 2026: every surface appeared and vanished at once. **Now** — `A 150ms fade, in place`. Both sides show what someone who has asked for reduced motion sees. The setting asks for less movement. It does not ask for less information. Sliding and scaling are what cause trouble, and a change in opacity is not movement. A drawer that is simply there, with nothing connecting it to what opened it, is harder to follow than one that fades in where it will sit. So every named animation carries its own reduced-motion version, and in it the travel and the scale are replaced by a short fade. Because it is built into the animation, a component cannot forget it. Two things stay as they were. Following a finger is not animation, so a dragged sheet still tracks the pointer. And the Loader substitutes rather than stops, because a spinner that does not spin looks broken. ## How these are built The right-hand side of every pair is the real named animation from `@ir/tokens/theme.css`, on the same `data-state` that Radix sets. It cannot drift from what ships. The left-hand side cannot be written as a class, and that is the linter doing its job: an ease-in, a 500ms duration and an animated width are all refused. They live in `packages/ui/.storybook/motion-specimens.css` as `data-specimen` rules — in Storybook only, never in the package, and never somewhere a component can reach for them. If your system asks for reduced motion, the left-hand examples stay still and the right-hand ones fade. A page about motion honours the setting it describes. The rules themselves, the tokens and the full list of named animations are in [Motion](motion.md). --- # Motion IR's products are consoles. Someone runs one for a shift, and opens the same drawer dozens of times before lunch. So motion here has one job: make the interface feel like it heard you, and then get out of the way. Picasso animates five things: surfaces that open and close; a press; colour; the Loader; and illustrations. Everything else changes at once — and for most of the interface, that is the right answer. Each rule on this page can be watched, wrong way beside right, in [Motion, before and after](motion-before-and-after.md). ## Should it move at all? Decide this first. It is allowed to end the conversation. **How often is it seen in a working day?** | Seen | Decision | |---|---| | Hundreds of times: a keyboard shortcut, moving through a table, switching pages | Nothing moves — not a short animation, none | | Dozens of times: a hover, a toggle, a filter chip, a tab | Colour only, or a change small enough to be felt rather than seen | | Now and then: a dialog, a drawer, a toast, a sheet | A named animation | | Rarely: first run, an empty state, a long job finishing | The one place a longer or warmer moment is allowed | Anything a keyboard triggers is in the first row, whatever it is. **What is it for?** It has to be one of four things: *feedback* (the interface heard the press), *where it came from* (a panel grows from its trigger, a toast leaves by the edge it arrived at), *what changed* (a row opened, a switch moved), or *bridging a jump* (something would otherwise appear with no connection to what caused it). "It looks good" is not one of them. **Is anyone reading it?** Data does not move for style. A chart does not draw itself in, a KPI does not count up, a table row does not slide. ### What does not move, and why Each of these was considered and turned down. | Not animated | Why | |---|---| | Charts, KPI tiles, sparklines, meters | Someone is reading the number | | The Sidebar's rail changing width | Width is a layout property: the page beside it would re-lay out on every frame | | Sidebar items, table rows, calendar days | Seen hundreds of times a day | | Tabs and the Segmented control | Navigation and view switches, used all day — colour only | | KPI rows and chart grids arriving | The dashboard is the product, not an entrance | | Anything on hover, beyond colour | A control that lifts or grows under the pointer is noise at this density | ## The scale Three durations and four curves, as tokens (`motion/*` in `core.json`, emitted as `--motion-*`). The scale is closed: a request for a fourth duration is a request to make something slower. | Token | Value | For | |---|---|---| | `motion/duration/fast` | 150ms | Small things, and leaving: a press, a popover or tooltip both ways, a dialog closing. Every fade that stands in for travel under reduced motion | | `motion/duration/base` | 200ms | Arriving: a scrim, a dialog, an accordion row. A drawer, toast or sheet leaving | | `motion/duration/slow` | 300ms | A surface travelling its own length: a drawer, toast or sheet sliding in. The ceiling | | `motion/easing/out` | `cubic-bezier(0.23, 1, 0.32, 1)` | The default — arriving, leaving, a press | | `motion/easing/in-out` | `cubic-bezier(0.77, 0, 0.175, 1)` | Something already on screen that moves or changes shape | | `motion/easing/drawer` | `cubic-bezier(0.32, 0.72, 0, 1)` | A sheet sliding from an edge. Illustrations' lift uses it too | | `motion/easing/settle` | `cubic-bezier(0.3, 1.35, 0.5, 1)` | A dragged surface coming back to where it was | `motion/easing/enter` and `exit` are deprecated. Both now equal `out`, and both go in the next major release. The curves are stronger than the CSS keywords of the same names, and that is deliberate: the keyword `ease-out` barely decelerates, so nothing reads as intended. Tailwind's own `ease-out` and `ease-in-out` classes are re-pointed at the tokens, so a class that says `ease-out` means the system's. ## The rules **Nothing starts slowly.** Arriving and leaving both decelerate on `easing/out`. There is no ease-in anywhere: a curve that starts slowly holds back the first frames, which are the ones someone is watching. Leaving feels quicker because it takes the shorter step, not because it accelerates. **Nothing appears from nothing.** A surface scales from 96% with a fade, never from zero. **An anchored panel grows from its trigger.** Popover, Dropdown menu, Select's menu and Tooltip point `transform-origin` at the origin Radix publishes (`origin-(--radix-popover-content-transform-origin)` and its siblings), so a menu opening below-left of its button grows from that corner. A Dialog is centred and scales from its centre — it is not anchored to anything. **Only `transform` and `opacity` move.** Never `width`, `height`, `margin`, `padding`, `top` or `left`: they re-lay out the page on every frame, and the page is charts. The Accordion's height is the one exception — nothing else opens a row, Radix measures the height so it never animates to `auto`, and it is kept short. **Keyframes for what mounts, transitions for what stays.** Radix removes a closing surface on `animationend` and does not wait for a transition, so everything that opens and closes is a keyframe animation that holds its last frame. Anything that stays on the page and changes state — a switch, a pressed button, a progress bar — is a transition, because a transition can be interrupted halfway and carry on from where it is. **It travels its own length.** `translateX(100%)`, never a pixel count. **Hover is colour.** Nothing changes size or position on hover. ## The named animations A component never states a duration or a curve. `theme.css` composes the tokens into named animations, and the component asks for one: | Utility | Used by | Timing | |---|---|---| | `animate-fade-in` · `-out` | The scrim behind Dialog, Drawer and Bottom sheet | base in · fast out | | `animate-dialog-in` · `-out` | Dialog, and the expanded Drawer | fade and scale from 96%: base in · fast out | | `animate-popover-in` · `-out` | Popover, Dropdown menu and its submenus, Select's menu, Tooltip | fade and scale from 96%, from the trigger: fast both ways | | `animate-drawer-in-end` · `-out-end` (and `-start`) | Side Drawer, the Sidebar's phone nav | slide from its edge, the other way in RTL: slow in · base out, on `easing/drawer` | | `animate-sheet-in` · `-out` | Bottom sheet | slide from the bottom edge: slow in · base out, on `easing/drawer` | | `animate-toast-in` · `-out` | Toast | fade and slide from the inline end: slow in · base out | | `animate-accordion-down` · `-up` | Accordion content | height and a fade, to the height Radix measures: base in · fast out | Applied on Radix's `data-state`, with no `motion-safe:` in front: ```tsx "data-[state=open]:animate-dialog-in data-[state=closed]:animate-dialog-out" ``` The anchored surfaces take the fast step both ways. They are small and open under the pointer, so anything longer reads as lag. Three details the table does not show: - **A Tooltip animates its delayed open only.** Moving along a row of triggers, Radix opens the next tooltip at once; a fade on each would make the row feel slower. - **A Toast follows a swipe.** It tracks the finger, carries on from where it is let go and settles back if the swipe is abandoned. In RTL the slide mirrors in CSS and `ToastProvider` turns the swipe round from the direction provider. - **A Bottom sheet follows a drag.** Released past a quarter of the panel, or thrown, it goes; short of that it comes back on `easing/settle` (`transition-settle`), which overshoots a couple of percent so the return reads as weight. To add one: a `@keyframes` and an `@utility` in `theme.css`, built only from the tokens, with its reduced-motion branch inside it. Then this table, the list in `packages/ui/src/__tests__/motion.test.ts`, and the changelog. ## The press A pressable control gives a little under the pointer. `Button` and an interactive `Chip` scale to 97% while they are held down, and the label and icon go with them — that is what makes it read as a press rather than a colour change. ```tsx "transition-press motion-safe:active:scale-97" ``` `transition-press` is the colours a control already animated, plus `scale`, on the fast step. It names its properties: Tailwind's bare `transition` animates eighteen of them. Not everything pressable presses. A text link does not shrink. A Button inside a `ButtonGroup` does not either — one member pulling away from its neighbours reads as the group coming apart. Tabs, sidebar items and table rows are navigation, and answer with colour. ## Things that move in place A switch's knob, a chevron turning, a progress bar. These are transitions on `transform`, and they state a curve but not a duration — the default is the fast step: ```tsx "transition-transform ease-out motion-reduce:transition-none" // a knob, a chevron "transition-transform ease-linear motion-reduce:transition-none" // a bar reporting progress ``` Progress is linear because it is reporting something; progress does not ease. A dragged surface returning to rest is the third: ```tsx "motion-safe:transition-settle" // a sheet let go short of the threshold ``` `transition-settle` transitions `translate` — not `transform` — on the base step and `easing/settle`. The two compose rather than conflict, which is what lets a dragged panel keep its offset while an exit animation drives `transform`; transitioning `transform` here animates nothing at all. It sits under `motion-safe:` rather than carrying `motion-reduce:transition-none`, because the drag itself still tracks the finger under reduced motion and only the release is switched off. ## Reduced motion Reduced motion means gentler, not absent. A surface that simply appears, with no connection to what opened it, is harder to follow, not easier. So every named animation carries its own `prefers-reduced-motion` branch, and under it travel and scale are replaced by a fade on the fast step. A drawer does not slide; it fades in where it will sit. A dialog does not scale; it fades. That is why a component writes no `motion-safe:` on them — the substitution is part of the animation, and cannot be forgotten. What that leaves to the component: - **A transition carries `motion-reduce:transition-none`.** The knob changes sides without travelling. - **A press scale sits under `motion-safe:`.** The pressed colour still answers. - **Following a finger is not animation.** A dragged sheet and a swiped toast track the pointer under reduced motion too; only the settle is switched off. - **The Loader substitutes rather than stops.** A spinner that does not spin looks broken, so travel becomes a slow cross-fade. ## In Figma Nothing moves on canvas. Figma carries the motion tokens as variables — the durations as numbers in milliseconds, the curves as strings — hidden from pickers. A static frame cannot show a transition, so the tokens are the spec, and a motion change has no Figma impact beyond a variable's value. ## Colour transitions A control with a hover or focus colour carries `transition-colors` and nothing else. It states no duration and no curve: `theme.css` sets Tailwind's defaults to `motion/duration/fast` and `ease`, the curve for a colour change. Tabs, Sidebar, Calendar and every input do this. ## The Loader The one piece of authored motion. Its seven utilities are declared in `packages/tokens/theme.css` rather than in `@ir/ui`, because the package ships no CSS of its own and every consuming app already imports the tokens: | Utility | Timing | |---|---| | `animate-loader-turn` | 3s linear, infinite | | `animate-loader-reach` | 1.5s `cubic-bezier(0.45, 0, 0.55, 1)`, infinite | | `animate-loader-fade` | 1.8s ease-in-out, alternating | | `animate-loader-pulse-l` · `-m` · `-r` | 1.3s ease-in-out, infinite | | `animate-loader-pulse-fade` | 1.4s ease-in-out, alternating | The two Fuse periods — 3s and 1.5s — are out of phase on purpose, so the gesture never lines up with itself. In Pulse, the outer dots swell as they spread while the middle swells as they close; three dots scaling together is a bounce, which is a different component. Skeleton pulses through Tailwind's own `animate-pulse`. ## Illustrations Product illustrations answer the pointer. It is the one place Picasso moves something because a person pointed at it. On marketing pages and in docs the picture listens to the pointer itself. Inside the console it stays still — an empty state takes `interactive={false}` — with one exception, the list card, below. There are three mechanics, one per kind of response. A drawing carries one. | Mechanic | What happens | Timing | |---|---|---| | **Lift** | A discrete change. The gap follows the pointer and shapes slide to make room. | `transition-illustration`: 600ms on `motion/easing/drawer`, 50ms stagger | | **Magnify** | A continuous one. Each shape swells by its distance from the pointer. | A spring per shape: stiffness 170, damping 22, mass 1 | | **Sequence** | A stepped loop while the pointer is over the picture. One shape is lit at a time. | `animate-illustration-check`: 2.4s `step-end`, a quarter each · `animate-illustration-flow`: 0.9s linear | | Mechanic | Drawings | Reach for it when the picture shows | |---|---|---| | **Lift** | `issue-alerts` · `search-results` · `dashboards` | A list or a set where one item is the point: alerts, results, widgets | | **Magnify** | `fleet-health` · `topology` · `team-access` | A field of many: endpoints, systems and their links, who can do what | | **Sequence** | `call-readiness` · `activity-log` · `integrations` · `assistant` | Steps in order feeding one answer: checks, a history, a connection, a question | Lift and sequence are CSS, declared in `packages/tokens/theme.css` beside the Loader's. Magnify is a spring, which cannot be written as a transition, so it runs in `illustration.tsx` and writes one attribute per shape per frame. Three rules hold all of them together: - **The layer that listens never moves.** Hover is read from a still, transparent layer and resolved against where the shapes now are. A handler on a shape that slides out from under the pointer flickers at every edge. - **One accent, and it moves.** The open alert, the nearest endpoint, the check that is running. It never spreads to several shapes. - **Nothing is said only on hover.** The picture is decoration; the heading beside it carries the meaning. Under reduced motion nothing travels. Lift changes state without the slide, magnify moves the accent and leaves the sizes alone, and sequence does not run — the drawing at rest already says what it means. ### List cards A list card is a row in a list of things a person can open — an alert rule, a fleet, a saved search — with an illustration cropped into its trailing corner. It is the one place a picture moves inside the console, and it is allowed because the card, not the picture, is the control: the card is what opens, and the picture answers the card. - **The card owns the hover.** The picture listens to nothing; the card passes `active` and the drawing plays its own response — lift opens the next item, magnify swells around the flagged shape, sequence runs. - **It waits for the pointer to settle.** `active` turns on after the pointer has rested on the card for 120ms, so a pointer crossing a list on its way somewhere else moves nothing. Leaving turns it off at once. - **Keyboard focus turns it on straight away.** `:focus-visible` on the card sets `active`; blur clears it. - **The card itself only changes colour.** Its border takes `border/primary/muted` on hover. The picture rises 4 inward and 8 up inside its crop, on `transition-illustration`; the card does not move. - **The rise mirrors with the crop.** In RTL the picture sits in the card's start corner, so the inward rise takes an `rtl:` twin with the sign turned. The drawing itself never mirrors. - **Nothing is said only by the picture.** The card's title, badge and meta carry the meaning, so the picture is `label={null}`. Under reduced motion the card still recolours, the picture does not rise, and the drawing changes state without travelling — the same fallbacks as above. ## Outside the scale The Loader's and the illustrations' timings are authored for those two things and are not part of the scale: `transition-illustration` on a Dialog is as off-system as `duration-300`. So a component that wants motion uses one of the named animations above, `transition-press`, `transition-colors` or `transition-transform` — or does without, and says which in a comment. Do not reach for `duration-300` or an arbitrary `ease-[…]`: the linter refuses the arbitrary value, and a bare Tailwind duration is a number outside the system. If a new surface needs to move, add a named animation to `theme.css` built from the `motion/*` tokens. ## Building and checking motion Three skills in `.agents/skills` carry these rules for an agent: `ir-motion` builds, `ir-motion-review` reviews a diff or the whole repo, and `ir-motion-opportunities` looks for places that should move and turns down the ones that should not. `packages/ui/src/__tests__/motion.test.ts` is the part a machine can check: no curve that starts slowly, nothing over 300ms, no layout property, and a reduced-motion branch on every named animation. jsdom cannot play an animation. Before calling motion done, run it in a browser, slow it down five times, turn on reduced motion, and set `dir="rtl"` if anything travels sideways. --- Picasso makes two promises about width, and they are not the same promise. **Desktop, 768 and up.** Every component fits any container in this range. A page can put anything in any column at any width the ladder reaches, and nothing runs past its box. This is the contract the library is built to. **Phone, 360 to 767.** A narrower contract that named components honour and declare. It is not assumed: a component is phone-ready when it says so, and `BottomSheet` and the sidebar's phone nav exist because specific products needed it. Anything that has not claimed the phone contract may still work — it is simply not promised. 360 is the floor because it is the narrowest viewport in common use. Below it, nothing is guaranteed. ### The phone canvases Four widths to draw at, as `screen/mobile/*`. They are **canvases, not breakpoints** — below `md` (768) there is one layout, so a phone has no breakpoints to name. They are deliberately off Tailwind's t-shirt ladder, because `lg` has to mean 1024 wherever it appears; these say where they sit in the range instead. | Token | Width | What it is | |---|---|---| | `screen/mobile/min` | 360 | The floor, and the width every `Narrow` story is cut from — 328 after gutters. Nothing may break here; it is not a size to design at | | `screen/mobile/small` | 375 | iPhone SE and the iOS baseline — the iOS case to check, not a second floor | | `screen/mobile/base` | 390 | **The canvas to design at.** iPhone 14/15, modern Android mid-range | | `screen/mobile/max` | 428 | The ceiling — Pro Max, large Android. Past this a phone layout stops growing rather than stretching | The breakpoints are `screen/desktop/*`, which do carry Tailwind's names and values, so `lg:` means the same thing in a token file, a Figma page name and a class name. ## The shell answers to the viewport; everything else answers to its container This is the rule that makes the rest work. The rail, the page padding and the phone nav are the shell's, and they read the viewport. A component inside the content column reads the column — `@3xl` and `@7xl`, never `xl` or `2xl` — because the column already has the rail, the padding, a width cap and any open drawer taken off it. A component that reads the viewport is wrong at the width it is actually given. ## The baseline **Nothing scrolls the page sideways.** Content that cannot fit gets its own scroller, wraps, or stacks. A table is the common case: the scroller belongs on the table's own container, so the page stays still and the header row stays where the reader left it. **Nothing is pinned wider than its container.** A fixed width — `w-96`, `shrink-0` on a row of slots — is a promise that the box will always be at least that wide, and on a phone it will not be. Fixed widths belong inside a scroller or below 360. **An anchored panel becomes a sheet.** Popover, Select and DropdownMenu position against an edge, and on a phone the edge is the viewport, so they clip. Below `md` the phone form is `BottomSheet`: it rises from the bottom edge, so its choices sit where a thumb already is. **Targets are 24 at minimum, 44 where a thumb is the pointer.** 24×24 is the floor (WCAG 2.2 AA, 2.5.8); 44 is what a thumb actually wants. Where the control is smaller than the row it sits in — a 16px checkbox in a 32px row — the row is the target, so the label wraps the control rather than sitting beside it. A 16px box with nothing around it is a miss, not a tap. **Spacing and type do not shrink.** The page gutter is 16 below `xl`, which includes every phone width, and the type ramp is the same ramp. A narrow screen gets fewer columns, not smaller text. **A row with fixed geometry takes a smaller size step, it does not scroll.** Six OTP boxes at `md` are 48 each: 288, plus a 16 separator and six 8 gaps is 352, against the 328 a 360 phone leaves after its gutters. `sm` is 304 and fits. Where a component offers size steps, the phone takes the step that fits — adding a scroller to a field people type into hides the digits they are checking. **Inputs stay 14, and iOS zooms on focus.** Safari on iOS zooms the page when a field under 16px takes focus, and Picasso's inputs are 14 (`sm` is 13). This is accepted. A larger text step for coarse pointers would change every form's height on a phone, and that was judged the worse trade. Do not raise the size in a product to stop it, and never disable zoom to hide it. **The rail is not on a phone.** Below `md` the sidebar is not a 48px strip — a strip of icons spends the one dimension there is least of. The trigger opens the same tree as a drawer over the page, from the inline start, with a strip of scrim left at the end edge to leave by. ## Claiming the phone contract A component is phone-ready when all of the following hold, measured rather than assumed: - it fits a 360 container with nothing past the right edge - every interactive target meets 24, and 44 where it is the primary action - anything anchored has a sheet form below `md` - its stories include a narrow case, so the next change is measured too --- # Right-to-left Picasso supports Arabic, Hebrew and Persian. A page in one of them reads from the right, and nearly everything follows: the sidebar is on the right, a drawer opens from the left, a switch turns on toward the left. The approach is shadcn's (January 2026), with the parts their CLI does at install time done here once, in the source. ## Setting it up Two things, set once at the root. Neither works without the other. ```tsx {children} ``` - **`dir` on ``** is what CSS reads: logical properties, `.rtl-mirror` and Tailwind's `rtl:` variant. On ``, so content in a portal — a menu, a dialog, a toast — gets it too. - **`DirectionProvider`** is what Radix reads. It does not look at the DOM. Without the provider the layout mirrors and the keyboard does not: the arrow that points at the next tab moves to the previous one. - **`lang`** picks the voice a screen reader uses, and switches letter-spacing off for Arabic script. In Storybook the toolbar's **Direction** control sets both for every story. ## The rules ### Logical properties, always `ps-4`, not `pl-4`. `start-0`, not `left-0`. `border-s`, `rounded-e-md`, `text-start`. They render the same left-to-right, which is why the physical ones creep back in. `picasso/no-physical-properties` refuses them; a genuine physical need is a disabled line with the reason beside it. A prop that names a place is logical too. Drawer's `side` is `start` or `end`, not `left` or `right`. ### What a logical class cannot reach | Thing | Mechanism | |---|---| | An icon that points along the reading direction | `rtl-mirror` on the icon | | A translate (Switch knob, Progress fill) | an `rtl:` twin with the sign turned: `translate-x-4 rtl:-translate-x-4` | | A keyframe that travels sideways (Drawer, Toast) | multiply by `--direction-sign`, which is 1 or -1 | | A gradient with a direction | `bg-linear-to-r rtl:bg-linear-to-l` | | Geometry done in script (pointer position, arrow keys, a swipe) | `useDirection()` | `useDirection()` is for script. To choose between two classes, use a logical class or `rtl:` instead — it cannot disagree with the DOM. ### Scales mirror Low is at the inline start. Slider, Threshold slider, Progress, Meter and File upload all fill from the right in Arabic, and the arrow key that points along the scale increases the value. ### Technical text does not A metric, an IP address, a SIP trace, an ID and a one-time code read left to right in every locale, in Latin digits. Inside right-to-left text the bidi algorithm reorders punctuation: `-5%` reads as `5%-` and `10.0.0.1:5060` comes apart at the colon. Put `ltr-island` on the element that holds the value: ```tsx 10.0.4.12:5060 ``` KPI tile, Progress, Table's numeric cells, Number input, OTP, Input group text and Threshold slider's readings already carry it. A numeric column is right-aligned in every locale, heading included: the units digit is on the right in Arabic and Hebrew too, as it is in a spreadsheet. ### Some things never mirror - Check marks, clocks, logos and media controls. - **A chart's time axis.** Time runs left to right for everyone who reads monitoring data. The legend, tooltip and labels around the chart follow the page. - Illustrations. ### Calendars are Gregorian Dates are Gregorian in every locale, because the product's timestamps are. The grid mirrors, and the week starts where the locale says: pass a date-fns `locale` to Calendar and Saturday or Sunday follows from it. ## Type Inter and JetBrains Mono have no Arabic or Hebrew glyphs. Every font stack, sans and mono, carries **Noto Sans Arabic** and **Noto Sans Hebrew** straight after the family itself, so those scripts look the same on every OS. Noto Sans Arabic covers Persian. **Noto Sans** is also in the library as a sans a brand can choose, for one family across all three scripts. `@ir/ui` ships no fonts. An app that serves these languages loads them: ```css @import "@fontsource/noto-sans-arabic/arabic-400.css"; @import "@fontsource/noto-sans-arabic/arabic-500.css"; @import "@fontsource/noto-sans-arabic/arabic-600.css"; @import "@fontsource/noto-sans-hebrew/hebrew-400.css"; @import "@fontsource/noto-sans-hebrew/hebrew-500.css"; @import "@fontsource/noto-sans-hebrew/hebrew-600.css"; ``` A browser fetches a fallback face only when the text on the page needs it, so an English page never downloads them. **Letter-spacing is zero for Arabic script.** The letters join, and any tracking pulls the joins apart. Under `lang="ar"`, `fa`, `ur`, `ps` or `ckb` the tracking tokens are zero and every type role follows. Hebrew is not joined and keeps its tracking. Uppercase does nothing in any of the three. ## Checking a component 1. Turn the Storybook **Direction** control to right-to-left and look. 2. Does anything point the wrong way, slide the wrong way, or sit outside its own box? 3. Use the keyboard: do the arrow keys follow what you see? 4. Is there a number, an address or a code in it? It should read exactly as it does in English. 5. `src/__tests__/rtl.test.tsx` holds the rules. A new directional icon fails there until it is mirrored or listed with the reason it must not be. ## Not done yet - Built-in strings are English: "Warning threshold", "Collapse sidebar", "Show hidden levels". A product can override most through props; there is no translation layer. - Arabic at 11 and 12px has not been checked for legibility or line height. - No Jalali or Hebrew calendar. --- # Tokens, brands and Figma sync ## The one rule **The repo is the source of truth for every token.** Figma follows it. A change can *start* in Figma, but it only counts once it is exported back into the repo and reviewed as a git diff — otherwise the next sync overwrites it. ``` packages/tokens/tokens/*.json ──npm run check──▶ dist/tokens.css → code ▲ └▶ dist/figma.json → Picasso Sync ▶ Figma │ │ └──── npm run figma:import ◀── .figma-export.json ◀── Picasso Export ◀───┘ ``` ## Two layers, the same in code and Figma | Layer | Figma collection | Modes | Holds | |---|---|---|---| | **Primitives** | `Primitives` | one per brand — `Clarion` · `Vantage` · … | colour ramps, type sizes, weights and families, spacing, radius, breakpoints | | **Semantic** | `Semantic` | `Light` · `Dark` | `bg` · `fg` · `border` · `status` · `chart`, plus the colours behind rings and shadows | Semantics point at primitives (`bg/primary/emphasis` → `palette/brand/600`), so the two switches are independent: **any frame can be any brand in either mode.** Text styles (`shared/text/*`) and effect styles (`ring/*`, `shadow/*`) sit on top, bound to those variables. > Line height (%) and letter spacing (em) live only inside the text styles — > Figma variables cannot hold either. Everything else is a variable. ## A brand is a set of choices Each brand is one small file, `packages/tokens/tokens/brands//brand.json`. It picks one option per axis from `presets.json`; the build turns the choices into that brand's primitives. | Choice | Options | Becomes | |---|---|---| | `colour.base` | any hex (optionally a pinned 11-stop `colour.ramp`) | `palette/brand/*` — generated in OKLCH, 600–950 solved for white text | | `neutral` | `cool` · `warm` | `palette/neutral/*` | | `radius` | `sharp` · `subtle` · `default` · `rounded` | `radius/base`; every radius step is a multiple of it | | `spacing` | `compact` ×0.875 · `default` · `relaxed` ×1.25 | the whole `space/*` ladder, each step rounded to the 2px grid | | `type` | a sans and a mono family | `type/family/*` | ```json { "name": "Vantage", "colour": { "base": "#7C3AED" }, "neutral": "warm", "radius": "rounded", "spacing": "default", "type": { "sans": "Manrope", "mono": "JetBrains Mono" } } ``` **Everything else is shared** — status ramps, vis colours, the type scale and every semantic. A brand whose colour is red does not make errors green. The one semantic a brand may change is **the ink on its emphasis surfaces** (`fg/on/*-emphasis`): white where it passes 4.5:1, the darkest neutral where it does not. It is measured, never chosen. In Figma it goes through internal `_on/*/light|dark` primitives, because Semantic's modes are Light/Dark only. ## Adding a brand ```bash cd packages/tokens npm run brand:new -- vantage --name Vantage --base "#7C3AED" \ --neutral warm --radius rounded --spacing default --sans Manrope --mono "JetBrains Mono" npm run check ``` The whole process, including switching a product onto the brand, is in [Create a brand and apply Picasso](../get-started/new-brand.md). Then run **Picasso Sync** in Picasso with `dist/figma.json`. The brand appears as a new mode of the Primitives collection. No components are copied or changed. A font not listed in `presets.json` gets a generic fallback stack and Inter's style names — add it to `presets.json` if its Figma style names differ (Manrope says `SemiBold`, Inter says `Semi Bold`). ## Previewing a brand **In Figma:** select a frame → **Layer** in the right panel → the variable-mode button → set **Primitives** to the brand and **Semantic** to Light or Dark. Nested frames inherit it. The *Brand modes (demo)* page shows all four combinations side by side. **In code:** `data-brand` on ``, with `class="dark"` independent of it. On `` and not on a wrapper — semantics are declared on `:root`, so a nested `data-brand` re-points the brand's primitives inside it but not the semantics already resolved above it. Figma has no such limit: any frame can be any brand. ```html ``` ## The Picasso Sync plugin A Figma plugin in `packages/figma-sync`. It reads the `figma.json` you choose — it has no network access and never talks to the repo — and makes the open file match it. **Install once** — Figma **desktop app** (the browser cannot load local plugins): Figma menu → **Plugins → Development → Import plugin from manifest…** → `packages/figma-sync/manifest.json`. **Run** — Plugins → Development → **Picasso Sync** → choose `packages/tokens/dist/figma.json`. | Button | Does | |---|---| | **Check** | Lists every difference — new, changed, extra, problems. Changes nothing. | | **Sync** | Makes the file match. Never deletes. | | **Sync + remove extras** | Also deletes variables and styles the repo no longer has (asks for a second click). | | **Export** (pick a brand) | Downloads that brand as `.figma-export.json` for `npm run figma:import`. Changes nothing. | What **Sync** does, in order: 1. Applies known renames (e.g. `_type/style/inter-*` → `sans-*`) so existing bindings survive. 2. Makes sure Primitives has one mode per brand and Semantic has Light and Dark. 3. Creates missing variables, then sets every value in every mode. **Aliases stay aliases.** Sets each variable's scope and description. 4. Sets each text style's font, size, line height, tracking and case, and binds it to the family, size and style variables. 5. Rebuilds each effect style's layers and binds every layer's colour to its `_shadow/*` or `_ring/*` variable. What it does **not** do: - **Edit components or layers.** They already point at the variables. - **Bring Figma edits back on its own.** Sync is one way; the way back is Export + `npm run figma:import`. - **Publish.** Publish Picasso as usual afterwards. Two things to know: - **Matching is by name.** Renaming a token creates a new variable and leaves the old one as an *extra*, with layers still bound to it. Planned renames go in the plugin's rename list. - **Fonts come from your computer.** Run the plugin in the desktop app so it can use locally installed fonts. ## Bringing a Figma change back to the repo When a change is easier to make in Figma — a semantic re-pointed, a type size nudged, a brand's ramp tuned by eye — export it instead of re-typing it. 1. In Picasso: **Picasso Sync → Export a brand**, pick the brand, **Export**. You get `.figma-export.json` in Downloads. 2. In `packages/tokens`: `npm run figma:import -- ~/Downloads/.figma-export.json` (add `--dry-run` to only list what would change). 3. Review `git diff`, then `npm run check`. The import compares the export with what the repo would generate for that brand and writes each difference to the file that owns it: | Changed in Figma | Lands in | |---|---| | `palette/brand/*` | the brand's `colour.ramp` (pinned; dropped if it equals the generated ramp) | | `palette/neutral/*`, `radius/base`, `space/*` | the brand's `neutral` / `radius` / `spacing` — **must match a preset** | | `type/family/*` | the brand's `type` | | any other primitive | `core.json` — **shared, so every brand changes**, and it says so | | a Semantic value | `light.json` / `dark.json` | | a text style | `core.json` `shared.text` — line height and tracking must be existing tokens | | an effect style's geometry | the shadow/ring composite in `light.json` and `dark.json` | | a brand that is not in the repo yet | a new `brands//brand.json` | **It refuses — and writes nothing — when a change breaks the model:** - a single radius step edited (steps are `radius/base` × multiplier — change the base) - a neutral ramp, radius base or spacing ladder that matches no preset (add a preset first) - `fg/on/*-emphasis` edited (it is measured by contrast — change the ramp) - a new variable or style (decide by hand whether it is shared or per brand) Exporting a brand nobody has touched reports *Figma matches the repo — nothing to import*, which is also a quick way to confirm the two are in step. ## Proving parity `npm run check` fails when: - light and dark do not define the same tokens - a brand's structure differs from Clarion's (a library swap or mode switch would drop bindings) - a shared primitive differs between brands - Clarion's hand-authored on-colours disagree with contrast measurement - the radius multipliers in `theme.css` drift from `core.json` Contrast tests (`packages/ui`) run for every brand. To prove Figma and the repo are identical, `packages/figma-sync/fingerprint.cjs` hashes every variable, text style and effect style — from `figma.json`, and (its `FIGMA` half) from the live file. Equal hashes, equal systems. ## Where things live | File | What | |---|---| | `tokens/core.json` | Primitives every brand shares; the radius ladder as multiples of `radius.base` | | `tokens/presets.json` | The menu: radius bases, spacing multipliers and ladder, neutral ramps, fonts | | `tokens/brands//brand.json` | One brand's choices | | `tokens/light.json` · `dark.json` | Semantics, shared by every brand | | `build/brands.mjs` | Choices → primitives, on-colour measurement, Figma export | | `dist/tokens.css` | Default brand in `:root`, every brand as `[data-brand]`, then the preset axes | | `dist/figma.json` | Every brand, for the plugin | | `build/figma-import.mjs` | Figma export → repo files, with the refusal rules | | `packages/figma-sync/` | The plugin and the fingerprint | --- # Typography **Inter** for everything, **JetBrains Mono** for `code` and `metric`, and **Oswald** for the wordmark. All three carry full fallback stacks — including Noto Sans Arabic and Hebrew — so never ship `font-family: Inter` alone. Three families, three tokens: `type/family/sans`, `/mono` and `/display`. The display family is the wordmark's alone. It is **not** `heading/display`, which is the 36px step of the Inter ramp and has nothing to do with Oswald — the two share a word and nothing else. **Tailwind's own size scale is cleared.** There is one vocabulary, and `text-md` is **14px**, not Tailwind's 16px `text-base`. Size and line height both come from the composite token, so `text-body-md` sets family, size, weight, leading and tracking together. ## The wordmark The one place the display family appears. `text-wordmark` is a composite step like any other — display family, `2xl`, Semi Bold, `snug` leading, `wide` tracking, uppercase — and the App shell's sidebar is its only consumer. ```tsx Clarion ``` It is deliberately not a size on the Inter ramp: a wordmark is a piece of identity, not a heading, and giving it its own step stops it drifting when the heading scale changes. ## Three weight tiers Size alone does not separate the roles — `heading/xs` and `body/lg` are both 16px. Weight is what distinguishes them: | Tier | Weight | | |---|---|---| | Body | Regular 400 | prose | | Label | Medium 500 | UI chrome | | **Heading** | **Semi Bold 600** | structure | Headings are Semi Bold at every step. Dark mode thins type, and Picasso ships a product people run dark during incidents — Medium goes soft where Semi Bold holds. ## The ramp ### Headings — six steps, each with a role | Style | Size | Leading | Role | |---|---|---|---| | `heading/display` | 36 | 120% | Marketing surface, empty-state hero. Once per screen at most. | | `heading/xl` | 30 | 120% | **Page title** | | `heading/lg` | 24 | 120% | **Section title** | | `heading/md` | 20 | 135% | **Card, panel and dialog title** | | `heading/sm` | 18 | 135% | **Subsection** | | `heading/xs` | 16 | 135% | **Dense panel heading, table group header** | The ramp was never the problem — nothing told anyone which step was a page title, so `xs` and `sm` did page-title work while the middle three starved. The roles are the fix. `display`, `xl` and `lg` carry **−2% tracking**; below 20px tracking is 0. ### Body — Regular, 150% leading `lg` 16 · `md` 14 · `sm` 13 · `xs` 12 ### Label — Medium | Style | Size | Leading | |---|---|---| | `label/lg` | 14 | 135% | | `label/md` | 13 | 135% | | `label/sm` | 12 | 135% | | `label/xs` | 11 | 135%, **uppercase**, +4% tracking | `label/xs` is the **eyebrow / overline** — the single sanctioned uppercase style, for chrome that must not read as data. Never on a button. See [Casing](../content/casing.md). ### Metric — JetBrains Mono, 100% leading | Style | Size | Weight | |---|---|---| | `metric/xl` | 30 | Semi Bold | | `metric/lg` | 24 | Semi Bold | | `metric/md` | 18 | Semi Bold | | `metric/sm` | 14 | **Medium** | A hero KPI number should read as a number. `sm` stays Medium because Semi Bold mono at 14px goes muddy — the asymmetry is deliberate. ### Code — Regular, 150% leading `md` 14 · `sm` 13 · `xs` 12 ## Line height is a ratio, never a pixel value | Leading | | Applied to | |---|---|---| | `none` | 100% | all `metric/*` | | `tight` | 120% | `heading/display`, `xl`, `lg` | | `snug` | 135% | `heading/md`, `sm`, `xs`, all `label/*` | | `default` | 150% | all `body/*`, all `code/*` | | `relaxed` | 165% | reserved for long-form | > ⚠️ **Figma cannot hold these as variables.** Binding a variable to > `lineHeight` or `letterSpacing` forces the unit to pixels — a `150%` ratio > becomes `150px`. So Figma keeps them as unbound percentage literals, and the > export must never write `lineHeight`, `letterSpacing` or `fontFamily` back.