Components · Menus, lists and dividers

List Item

A list item is the content of one row: an optional leading element, a label and an optional trailing element. It is used inside Menu, Overflow menu, List Picker, Drawer link and Filter sections in drawer content.

Every example on this page is the real component, not a picture. The row itself (height, padding, divider, hover, focus) belongs to the container. Figma: List Item Content.

Playground

Choose a breakpoint, size, leading element, label, overline, supporting text and trailing element. The list item and its markup update. The item sits in a demo row, as it would in a Menu. Click it to toggle it.

Breakpoint
Size
Label
Overline
Supporting text

Markup for this selection

HTML

Overview

A list item is the content of one row: an optional leading element, a label and an optional trailing element. It is used inside Menu, Overflow menu, List Picker, Drawer link and Filter sections in drawer content.

List Item has two sizes (Large and Small), seven leading elements, seven trailing elements, a regular or bold label, and optional overline and supporting text. The row itself (height, padding, divider, hover and focus) belongs to the container.

This documentation has three pages. Examples & Guidelines (this page) shows when and how to use a list item. Specifications holds the values: tokens, sizes, states and requirements. Code shows how to add one to a page.


Usage

When to use

Use a list item to fill a row in a container that already exists. It is not a page element on its own. Use it:

  • As the rows of a Menu or an overflow menu
  • In a list picker, a drawer link or a filter section, to choose a value
  • To show a label with a short value, an icon, a swatch, an image or a control

When not to use

One leading type per list

Every row in a list starts with the same kind of element, so the labels line up and the list is easy to scan.

Do use one leading type in a list.
Do not mix check boxes and icons in the same list.

Keep the label on one line

Use the trailing value only for a short number or text. A long label wraps and breaks the rhythm of the list.

Do keep the label short and the trailing value to a number or a word.
Do not write a label that wraps onto a second line.

For a standalone form control

A check box, radio or switch that stands alone in a form is eco-checkbox, eco-radio or eco-switch. A list item draws the same look as a row’s content.

For navigation, tables and cards

Page navigation links are in Links, tabular data is a Docs table, and a long description with actions is a card or a section.

Quick reference

The user…Use
chooses from a list that opens from a button or a SelectMenu with list items as rows
picks a value in a filter or picker rowList item with a check box, radio or swatch
sees one fixed label and valuePlain text, or a table (eco-docs-table)
reads a long description with actionsNot a list item: use a card or section

Do

  • Keep the label to one line.
  • Use one leading type per list: do not mix check boxes and icons.
  • Inside a Menu put the state (aria-selected) on the row. A standalone item with a control uses role and aria-checked.
  • Use the trailing value for a short number or text.

Don’t

  • Use a list item outside a container (Menu, picker, drawer).
  • Put a real <input> inside an option row: the leading box is presentational.
  • Add hover or divider styles to the list item: the container owns them.
  • Hardcode colors or sizes: use the tokens and size classes.

Anatomy

List item

  1. Leading element. Optional: an icon, a check box, a radio button, a color swatch (alone or in a frame) or an image.
  2. Overline. Optional. A small uppercase line above the label, in text-tertiary.
  3. Label. body-md (Large) or body-sm (Small), regular or bold. One line.
  4. Supporting text. Optional. body-sm in text-tertiary below the label, clipped after two lines.
  5. Trailing element. Optional: an icon, a short value in secondary or tertiary text, or a check box, radio or switch.

The gap between the parts is 8px. The row height comes from the tallest part and the container.


Variants

Seven leading elements and seven trailing elements combine freely, with a regular label, a bold label or no label, and optional overline and supporting text. Use the Breakpoint toggle to preview Desktop (769px and up) and Mobile (below 769px). Sizes are under Sizes below.

Breakpoint

Leading

What comes before the label: nothing, an icon, a check box, a radio button, a color swatch (alone or in a frame) or an image.

Trailing

What comes after: nothing, an icon, a short value in secondary or tertiary text, or a control (check box, radio, switch). A trailing control is presentational: the item or row carries the state. Click an item to toggle it.

Overline and supporting text

One to three lines: an optional overline above the label (small uppercase, tertiary) and optional supporting text below it (body-sm, tertiary, clipped after two lines). The container row needs vertical padding for rows taller than one line.

Label weight

Regular is the default. Bold marks a heading-like row, often with a secondary value.


Sizes

Large is the default. Small is for compact surfaces. The Large label changes at 769px; Small is the same on every breakpoint. The values are under Sizes in Specifications.

Breakpoint

Layout & Appearance

Alignment

The leading element and the label stay together at the left. The trailing element sits at the far right. All parts are centered vertically, also in rows with an overline or supporting text.

Placement

A list item is placed inside a container row. The container draws the row height, the padding, the divider, the hover and the focus.

Width

The item fills the width of its row (width: 100%).

Appearance

The label is text-primary and trailing text is secondary or tertiary. A selected check box, radio or swatch frame looks like the matching ECO component. Token names and values are under Design Tokens in Specifications.


Behavior

Hover and focus

A list item has no hover or focus of its own: the container row draws them (see Menu). A standalone item with a role gets a pointer and a 2px focus ring.

Selected

Inside a container the row carries aria-selected. A standalone item with a check box, radio or switch is itself role="checkbox", "radio" or "switch" with aria-checked: a click, Space or Enter toggles it. A radio only selects, and Arrow keys move inside its radiogroup.

Disabled

A disabled item has text-disabled text and icons and is not focusable. All states are listed under States in Specifications.


Accessibility

All requirements are listed under Accessibility Requirements in Specifications.

Keyboard support

A standalone item is one tab stop. Space or Enter toggles it. In a radio group the checked radio is the tab stop, and the Arrow keys move and select. Inside a Menu the container handles the keys.

Screen reader support

The check box, radio and switch parts are aria-hidden. The state comes from aria-selected on the row or aria-checked on a standalone item with a role. Never put a real <input> inside an option row.



References