Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Primitives
  2. List Item
  3. Usage

List item

Usage

Overview

ListItem represents a row in list-like surfaces with support for navigation (href) or imperative actions (onClick). Choosing the right mode preserves semantic HTML and predictable keyboard behavior—critical when list groups back secondary navigation in dispatch panels.

When to use

  • Rows that primarily navigate to another screen or expand a detail pane.
  • Simple actions that logically belong to the row (pin, star) without turning the whole row into a confusing hybrid.

When not to use

  • Single free-standing actions—use Button for clarity.
  • Data tables where sort, select, and resize matter—use Table/DataTable rows.
  • Rows that mix unrelated controls—split into structured layouts.

Variants

Navigation vs action mode should be mutually exclusive per row pattern; do not nest interactive controls that fight each other for events.

Anatomy

Primary label, optional description, optional leading/trailing slots, focus ring spanning the interactive region when appropriate.

Content guidelines

  • Use formatMessage for labels; keep descriptions one line when possible.
  • Truncate with tooltips only when full text is available to assistive tech.

Behavior and states

  • Loading rows should disable interaction or swap to skeletons—avoid click targets that no-op.
  • Selected vs unselected styling must be per design system for active nav items.

Best practices

  • Do use href when the row is navigation-first—supports Cmd/Ctrl+click and accessibility expectations.
  • Do reserve onClick for in-place actions when designers explicitly model that pattern.
  • Don’t nest buttons inside a full-row link without careful event handling and accessibility review.
  • Don’t use list items as table replacements for wide data grids.

Accessibility

  • Ensure focus visibility and roles match whether the row is a link or button.
  • Provide descriptive names; decorative icons must not replace text.

Related Components

  • List group for stacking items.
  • Interactable when composing complex hit targets.
  • Sidebar item patterns for navigation density.

Previous

List Group / Accessibility

Next

List Item / API and Development

On this page

Overview
When to use
When not to use
Variants
Anatomy
Content guidelines
Behavior and states
Best practices
Accessibility
Related Components