Focus ring draft v0.2.0
The one visible focus indicator every focusable component shows on keyboard focus.
People who move through an interface with a keyboard, a switch or another assistive input need to see which component will receive their next action. The focus ring is the system's single answer: the same solid ring, in the same color, at the same distance, around every focusable component, on every surface and in every mode. Components do not design their own focus indicator; they draw this one from their focus-visible tokens, which alias the tokens below.
Tokens
Semantic tokens owned by the foundation (tokens in packages/components/specs/foundations/focus.spec.json). They live in packages/tokens/src/semantic/ (recreated from the Figma library) or tokens/additions/semantic/ (added by the design system), with their other values in tokens/modes/, tokens/additions/modes/ and tokens/platforms/.
| Token | Type | Value | Resolved | CSS |
|---|---|---|---|---|
color.focus.ring
Focus indicator color shared by every interactive component.
|
color |
{brand.light.600}
|
light
#175DD6
dark
#9EE7FA
|
--color-focus-ring
|
focus.ring.width
Focus ring of every component: the strong focus of the stroke scale, thick enough for WCAG 2.4.13 Focus Appearance (AAA).
|
dimension |
{stroke-width.lg}
|
2.4px
|
--focus-ring-width
|
focus.ring.offset
|
dimension |
{space.4}
|
4px
|
--focus-ring-offset
|
Components following it
Derived from the component tokens aliasing the foundation's tokens. Every component with a focusable role must follow it (pnpm validate).
| Component | Component tokens aliasing the foundation |
|---|---|
| Accordion |
|
| Breadcrumb |
|
| Button |
|
| Checkbox group |
|
| Checkbox |
|
| Dropdown |
|
| Icon button |
|
| Number field |
|
| Pagination |
|
| Radio group |
|
| Search field |
|
| Select |
|
| Slider |
|
| Switch |
|
| Text field |
|
| Textarea |
|