Skip to main content
For development, import List from @servicetitan/anvil2. For design, find it in the Anvil2 file.

Anatomy

The List consists of two primary elements that work together to present content in a structured format.
  1. List container – The wrapper that renders as either an unordered list (ul) or ordered list (ol), applying typography and spacing from the design system.
  2. List item – Individual items within the list, rendered as li elements.

Options

The List supports the following configurations to accommodate various content and layout scenarios.

Variant

Lists can be unordered (bullets) or ordered (numbers). Use unordered lists for items without sequence; use ordered lists for steps, rankings, or sequence-dependent content.

Size

Typography size aligns with the design system paragraph scale. Size affects readability and hierarchy when lists appear alongside other content.

Nesting

Lists support nesting. Place a List inside a List item to create sub-lists (for example, an ordered sub-list inside an unordered parent).

Behavior

The List responds to the chosen variant and size without interactive states. It renders semantic HTML so screen readers announce list structure and item count correctly.

Usage Guidelines

Use the List when presenting content as a series of items that benefit from list semantics and design system styling.

How to Use

Use List with List.Item for each entry. Set variant="ordered" for numbered lists; omit it or set variant="unordered" for bullet lists.
Do
Use List for presentational lists with correct semantic markup.
Don’t
Don’t use List for interactive selection; use Listbox or Menu instead.

Content

Content within each List item should be concise and scannable. Keep items parallel in structure where possible. For ordered lists, use clear step or sequence language.

Keyboard Interaction

Users can navigate the List using standard keyboard controls. Lists are not focusable as a single widget; focus moves through interactive elements inside items if present. Semantic list markup supports screen reader navigation (e.g., list length and position announcements).

Code

Common Examples

Unordered list (default)

Omit variant or set variant="unordered" to render a ul with bullet markers.

Ordered list

Set variant="ordered" to render an ol with numeric markers. You can pass native ol attributes such as start and reversed.

Size

Use size to control typography (small, medium, large).

Nested lists

Render a List inside a List.Item to create sub-lists. Use a different variant (e.g., ordered inside unordered) when it fits the content.

Ordered with start and reversed

When variant="ordered", you can pass start (number) and reversed (boolean) as with native ol.

React Accessibility

The List component renders semantic ul/ol and li elements, so list structure is exposed to assistive technologies without extra ARIA. Screen readers can announce the list and the number of items. Keep list item content readable and avoid using List for interactive selection; use Listbox or Menu for that.
Last modified on October 27, 2026