For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/components/list.md.

List

A semantic ul or ol with its spacing and markers under control โ€” reach for ordered only when the sequence matters, and for a Table as soon as each item carries fields of its own. Markers are off by default and role="list" is set either way, so a list without bullets is still a list to a screen reader.

Source ยท Storybook

Usage

import { List, ListItem } from '@wallarm-org/design-system/List';

Examples

Ordered

variant='ordered' changes the element to ol; the numbers themselves come from marker='decimal', which is a separate decision from the element.

With disc

marker='disc' turns the bullets on and indents the list by 24px to make room for them.

With icons

ListIcon puts a meaningful glyph where the marker would be, coloured by what the row says; ListItem is a flex row, so the icon and its text share a baseline.

Spacing

Three of the seven spacing steps. The gap sits between items only, so a wrapped item keeps its own lines tight while the list stays loose.

Props

PropTypeDefaultDescription
variantListVariant | undefinedunordered
spacingListSpacing | undefined
markerListMarker | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
data-testidstring | undefined

ListIcon

PropTypeDefaultDescription
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

ListItem

PropTypeDefaultDescription
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

Explorer