Rost
← All components
component

Chip

A small outlined label you can click, for filters and quick choices.

In codeContract: reviewGuidance: agreedContract on GitHubFigma 139:317
Default
Disabled

Hover, press or tab to one to see the other 3 states.

When to use

  • Used for filters and quick choices in a row: categories, date ranges.

When not to use

  • A status nobody clicks: Badge.
  • A topic on a piece of content: Tag.

Behaviour

One status (Default) and five states. Hover, pressed and focus come from the browser. There's no selected chip in the kit yet, so a selected chip needs designing before anyone builds one. Not an improvised fill.

Accessibility

  • Element: <button type="button">, with aria-pressed when it filters.
  • Group: wrap the set in something with a name (role="group" and aria-label="Filter by category").
  • Focus: focus-ring, on :focus-visible.

Content

One or two words, sentence case.

Props

PropTypeValuesDefault
statusenumDefaultDefault

States: Default, Hover, Pressed, Focus, Disabled.

Where it's used

Where code differs on purpose

Values

Straight from the contract. Each value sits next to its token, because six tokens here all come out as #3a3a3a and the colour alone can't tell you which one is right.

Never changes

PartPropertyValueToken
rootjustify-contentcenterlayout
rootalign-itemscenterlayout
rootdisplayinline-flexlayout
rootvertical-alignmiddlelayout
rootpositionrelativelayout
rootbackgroundnoneFigma frame size
rootbordernoneFigma frame size
rootfontinheritFigma frame size
rootcursorpointerFigma frame size
rootoutlinenoneFigma frame size
rootgap8pxspacing/gap/small
rootheight24pxspacing/size/small
rootpadding-bottom2pxspacing/gap/3xsmall
rootpadding-top0pxspacing/gap/none
rootpadding-left8pxspacing/gap/small
rootpadding-right8pxspacing/gap/small
rootborder-radius10000pxspacing/radius/full
labelflex-shrink0layout
labelwhite-spacenowraplayout
labeltext-aligncenterlayout
labelpositionrelativelayout
labelfont-family'General Sans Variable'font-family/base
labelfont-weight500typography/label/font-weight/medium
labelline-height14pxtypography/label/line-height
labelfont-size12pxtypography/label/font-size
labelletter-spacing0pxtypography/label/letter-spacing
outlineborder-sidesalllayout
outlinepositionabsolutelayout
outlineinset0layout
outlineborder-radius10000pxspacing/radius/full
outlinepointer-eventsnoneFigma frame size
focus-ringdisplaynonelayout
focus-ringpositionabsolutelayout
focus-ringinsetcalc(-1 * var(--spacing-gap-2xsmall))layout
focus-ringborder-stylesolidno token yet
focus-ringborder-width2pxspacing/outline/medium
focus-ringborder-color#999actions/secondary/regular/focus/focus-ring
focus-ringborder-radius10000pxspacing/radius/full
focus-ringpointer-eventsnoneFigma frame size

Changes by variant

focus-ring.display1
status=Default, state=Focusblocklayout
label.color5
status=Default, state=Default#d3d9d5actions/secondary/regular/default/label
status=Default, state=Hover#edededactions/secondary/regular/hover/label
status=Default, state=Pressed#d3d9d5actions/secondary/regular/pressed/label
status=Default, state=Disabled#d3d9d5actions/secondary/regular/disabled/label
status=Default, state=Focus#d3d9d5actions/secondary/regular/focus/label
outline.border-color5
status=Default, state=Default#edededactions/secondary/regular/default/outline
status=Default, state=Hover#edededactions/secondary/regular/hover/outline
status=Default, state=Pressed#edededactions/secondary/regular/pressed/outline
status=Default, state=Disabled#edededactions/secondary/regular/disabled/outline
status=Default, state=Focus#edededactions/secondary/regular/focus/outline
outline.opacity5
status=Default, state=Default0.24opacity/gentle
status=Default, state=Hover0.64opacity/strong
status=Default, state=Pressed1opacity/solid
status=Default, state=Disabled1opacity/solid
status=Default, state=Focus0.24opacity/gentle
root.cursor1
status=Default, state=DisableddefaultFigma frame size
root.opacity1
status=Default, state=Disabled0.24opacity/gentle