Rost
← All components
component

ListItem

One row you can pick in a list or a nav. A label, an optional line under it, and optional icons and a status dot.

In codeContract: reviewGuidance: agreedContract on GitHubFigma 346:3364
Default · not selected
Default · selected
Disabled · not selected
Disabled · selected

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

When to use

  • Used for a list of things to pick from, or the items in a side nav: one row each, the picked one in green.

When not to use

  • A row of a few options side by side. That's Tabs or Toggle.
  • Long text. The label and the line under it stay on one line each.

Behaviour

selected is the picked one. Hover, pressed and focus come from the browser, and disabled fades the whole row to opacity/gentle. On a selected row the status dot turns dark, the way Figma switches the badge to the light theme there.

Accessibility

  • Element: a link (<a href>, with aria-current="page" on the current one in a nav), or a <button> that does something.
  • Name: the label. The icons are aria-hidden; the status dot needs words nearby if it means something.
  • Keyboard: nothing of its own. Tab reaches it, Enter follows the link, and Enter or Space presses the button.
  • Focus: the focus-ring part, on :focus-visible.

Content

A noun or a short phrase, sentence case. The description is one short line.

Props

PropTypeValuesDefault
labelslot
descriptionslot
leadingslot
badgebooleanfalse
actionslot
selectedbooleanfalse
iconOnlybooleanfalse

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

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
rootdisplayflexlayout
rootalign-itemscenterlayout
rootpositionrelativelayout
rootwidth100%layout
rootgap8pxspacing/gap/small
rootpadding-top8pxspacing/gap/small
rootpadding-bottom8pxspacing/gap/small
rootpadding-left12pxspacing/gap/small-medium
rootpadding-right12pxspacing/gap/small-medium
rootmin-height48pxspacing/size/medium-large
rootborder-radius12pxspacing/radius/medium
rootbackgroundnoneFigma frame size
rootbordernoneFigma frame size
rootfontinheritFigma frame size
roottext-alignleftlayout
roottext-decorationnoneFigma frame size
rootcursorpointerFigma frame size
rootoutlinenoneFigma frame size
backgroundpositionabsolutelayout
backgroundinset4pxlayout
backgroundborder-radius8pxspacing/radius/small
backgroundpointer-eventsnoneFigma frame size
startdisplayflexlayout
startalign-itemscenterlayout
startflex1 1 0layout
startmin-width0Figma frame size
startpositionrelativelayout
startgap8pxspacing/gap/small
leadingdisplayflexlayout
leadingflex-shrink0layout
leadingwidth20pxspacing/size/xsmall
leadingheight20pxspacing/size/xsmall
textdisplayflexlayout
textflex-directioncolumnlayout
textgap2pxspacing/gap/3xsmall
textpadding-bottom2pxspacing/gap/3xsmall
textmin-width0Figma frame size
labelwhite-spacenowraplayout
labelfont-family'General Sans Variable'font-family/base
labelfont-weight400typography/paragraph/font-weight/regular
labelfont-size14pxtypography/paragraph/font-size
labelline-height20pxtypography/paragraph/line-height
labelletter-spacing0pxtypography/paragraph/letter-spacing
descriptionwhite-spacenowraplayout
descriptionfont-family'General Sans Variable'font-family/base
descriptionfont-weight400typography/label/font-weight/regular
descriptionfont-size10pxtypography/placeholder/font-size
descriptionline-height12pxtypography/placeholder/line-height
descriptionletter-spacing0pxtypography/placeholder/letter-spacing
enddisplayflexlayout
endalign-itemscenterlayout
endpositionrelativelayout
endgap8pxspacing/gap/small
badgedisplayflexlayout
badgealign-itemscenterlayout
badgejustify-contentcenterlayout
badgewidth24pxspacing/size/small
badgeheight24pxspacing/size/small
dotwidth8pxon purpose: The small Badge's own 8px dot.
dotheight8pxon purpose: The small Badge's own 8px dot.
dotborder-radius10000pxspacing/radius/full
dotbackground#ededednon-interactive/background/contrast
actiondisplayflexlayout
actionflex-shrink0layout
actionwidth20pxspacing/size/xsmall
actionheight20pxspacing/size/xsmall
focus-ringdisplaynonelayout
focus-ringpositionabsolutelayout
focus-ringinset0layout
focus-ringborder-stylesolidno token yet
focus-ringborder-width2pxspacing/outline/medium
focus-ringborder-radius12pxspacing/radius/medium
focus-ringpointer-eventsnoneFigma frame size

Changes by variant

action.color10
state=Default, selected=True#060805interactive/active/default/icon
state=Hover, selected=True#060805interactive/active/hover/icon
state=Pressed, selected=True#060805interactive/active/pressed/icon
state=Focus, selected=True#060805interactive/active/focus/icon
state=Disabled, selected=True#060805interactive/active/disabled/icon
state=Default, selected=False#00d669interactive/inactive/default/icon
state=Hover, selected=False#00b450interactive/inactive/hover/icon
state=Pressed, selected=False#00d669interactive/inactive/pressed/icon
state=Focus, selected=False#00d669interactive/inactive/focus/icon
state=Disabled, selected=False#00d669interactive/inactive/disabled/icon
background.background7
state=Default, selected=True#00d669interactive/active/default/background
state=Hover, selected=True#00b450interactive/active/hover/background
state=Pressed, selected=True#00913ainteractive/active/pressed/background
state=Focus, selected=True#00d669interactive/active/focus/background
state=Disabled, selected=True#00d669interactive/active/disabled/background
state=Hover, selected=False#006f27interactive/inactive/hover/background
state=Pressed, selected=False#00913ainteractive/inactive/pressed/background
background.opacity7
state=Default, selected=True1opacity/solid
state=Hover, selected=True1opacity/solid
state=Pressed, selected=True1opacity/solid
state=Focus, selected=True1opacity/solid
state=Disabled, selected=True1opacity/solid
state=Hover, selected=False0.24opacity/gentle
state=Pressed, selected=False0.24opacity/gentle
description.color10
state=Default, selected=True#282828interactive/active/default/sub-label
state=Hover, selected=True#3a3a3ainteractive/active/hover/sub-label
state=Pressed, selected=True#3a3a3ainteractive/active/pressed/sub-label
state=Focus, selected=True#3a3a3ainteractive/active/focus/sub-label
state=Disabled, selected=True#3a3a3ainteractive/active/disabled/sub-label
state=Default, selected=False#999999interactive/inactive/default/sub-label
state=Hover, selected=False#d3d9d5interactive/inactive/hover/sub-label
state=Pressed, selected=False#c2c7c3interactive/inactive/pressed/sub-label
state=Focus, selected=False#999999interactive/inactive/focus/sub-label
state=Disabled, selected=False#999999interactive/inactive/disabled/sub-label
dot.background5
state=Default, selected=True#060805non-interactive/background/primary
state=Hover, selected=True#060805non-interactive/background/primary
state=Pressed, selected=True#060805non-interactive/background/primary
state=Focus, selected=True#060805non-interactive/background/primary
state=Disabled, selected=True#060805non-interactive/background/primary
focus-ring.border-color2
state=Focus, selected=True#b6ffdainteractive/active/focus/focus-ring
state=Focus, selected=False#999999interactive/inactive/focus/focus-ring
focus-ring.display2
state=Focus, selected=Trueblocklayout
state=Focus, selected=Falseblocklayout
label.color10
state=Default, selected=True#060805interactive/active/default/label
state=Hover, selected=True#060805interactive/active/hover/label
state=Pressed, selected=True#060805interactive/active/pressed/label
state=Focus, selected=True#060805interactive/active/focus/label
state=Disabled, selected=True#060805interactive/active/disabled/label
state=Default, selected=False#d3d9d5interactive/inactive/default/label
state=Hover, selected=False#edededinteractive/inactive/hover/label
state=Pressed, selected=False#d3d9d5interactive/inactive/pressed/label
state=Focus, selected=False#d3d9d5interactive/inactive/focus/label
state=Disabled, selected=False#d3d9d5interactive/inactive/disabled/label
leading.color10
state=Default, selected=True#060805interactive/active/default/icon
state=Hover, selected=True#060805interactive/active/hover/icon
state=Pressed, selected=True#060805interactive/active/pressed/icon
state=Focus, selected=True#060805interactive/active/focus/icon
state=Disabled, selected=True#060805interactive/active/disabled/icon
state=Default, selected=False#00d669interactive/inactive/default/icon
state=Hover, selected=False#00b450interactive/inactive/hover/icon
state=Pressed, selected=False#00d669interactive/inactive/pressed/icon
state=Focus, selected=False#00d669interactive/inactive/focus/icon
state=Disabled, selected=False#00d669interactive/inactive/disabled/icon
root.justify-content1
iconOnly=Truecenterlayout
root.opacity2
state=Disabled, selected=True0.24opacity/gentle
state=Disabled, selected=False0.24opacity/gentle
start.flex1
iconOnly=Truenonelayout