Form tokens

Shared form-control utilities — neutral focus ramp, flat surfaces, explicit error borders.

Foundations · fixture-only

Primitive-aligned custom controls

Compose formControlSurface + formControlBorder() on bespoke inputs so focus matches Input/Select.

Workshop: SearchableSelect trigger, inline editors, filter popovers with text fields.

Fixture data only — behaviour matches production chrome

Error state borders

Pass error to formControlBorder(true) or the error prop on Input — danger ring only on invalid fields.

Workshop: FormField validation on create/edit dialogs.
Avoid: Brand-colored focus on invalid fields — error uses danger tokens only.

Fixture data only — behaviour matches production chrome

Duration formatting helper

formatDurationMs for consistent tool-step and run-time labels in agent and ops surfaces.

Workshop: Agent transcript tool steps, workflow run timelines.

Fixture data only — behaviour matches production chrome

Control chrome

Input, Select, and Textarea compose formControlSurface + formControlBorder — inspect focus and error below.

Default and error

Light

Dark

Token strings

Copy-paste utilities for custom controls that must match primitives.

formControlSurface

rounded-[6px] border bg-surface text-fg placeholder:text-hint

formControlChrome

outline-none focus:outline-none focus-visible:outline-none border-edge transition-[border-color,box-shadow] duration-100 hover:border-ghost focus-visible:border-ghost focus-visible:ring-[0.5px] focus-visible:ring-ghost/55 focus-visible:ring-offset-0

formControlBorder()

outline-none focus:outline-none focus-visible:outline-none border-edge transition-[border-color,box-shadow] duration-100 hover:border-ghost focus-visible:border-ghost focus-visible:ring-[0.5px] focus-visible:ring-ghost/55 focus-visible:ring-offset-0

formControlBorder(true)

border-danger outline-none transition-[border-color,box-shadow] duration-100 hover:border-danger focus-visible:border-danger focus-visible:ring-[0.5px] focus-visible:ring-danger/20 focus-visible:ring-offset-0

formatDurationMs(2400)

2.4s