Skip to content

List

A structured vertical list for displaying items with optional icons, secondary text, and actions.

Preview

  • Getting started guide
    Introduction to the design system
  • Component library
    Browse all available components
  • Changelog
    Recent updates and releases

Simple list (no border)

  • Alice Martin
  • Bob Chen
  • Carol Davis

Anatomy

  • Icon (optional) -- leading icon or avatar for visual context.
  • Content -- primary text with optional secondary line.
  • Action (optional) -- trailing icon or button (e.g. chevron, delete).

Props

PropTypeDefaultDescription
borderedbooleanfalseWrap list in a visible border
childrenReact.ReactNode--List items

List.Item

PropTypeDefaultDescription
iconReactNode--Leading icon
primarystring--Primary text
secondarystring--Secondary text
actionReactNode--Trailing action
onClick() => void--Click handler

Code example

React

tsx
import { List } from '@thepace/lexicon/components';

<List bordered>
  <List.Item
    icon={<BookmarkIcon />}
    primary="Getting started guide"
    secondary="Introduction to the design system"
    action={<ChevronRightIcon />}
    onClick={() => navigate('/start')}
  />
  <List.Item
    icon={<GridIcon />}
    primary="Component library"
    secondary="Browse all available components"
  />
</List>

Vanilla HTML

html
<ul class="lex-list lex-list--bordered">
  <li class="lex-list__item">
    <svg class="lex-list__icon"><!-- icon --></svg>
    <div class="lex-list__content">
      <div class="lex-list__primary">Getting started guide</div>
      <div class="lex-list__secondary">Introduction to the design system</div>
    </div>
    <svg class="lex-list__action"><!-- chevron --></svg>
  </li>
</ul>

CSS class reference

ClassPurpose
.lex-listBase list reset
.lex-list--borderedBordered container
.lex-list__itemList item row
.lex-list__item--clickableClickable item
.lex-list__iconLeading icon
.lex-list__contentText wrapper
.lex-list__primaryPrimary text
.lex-list__secondarySecondary text
.lex-list__actionTrailing action

Accessibility

  • Use <ul> or <ol> for semantic list markup.
  • Clickable items should use role="button" or be wrapped in <a> / <button>.
  • Trailing actions need aria-label if icon-only.

Guidelines

Do

  • Use secondary text to add context without cluttering the primary label.
  • Use the bordered variant when the list stands alone (not inside a card).
  • Keep primary text concise — one line maximum.

Don't

  • Don't mix interactive and non-interactive items in the same list without clear visual distinction.
  • Don't use a list for tabular data — use a Table instead.

Released under the MIT License. A product by the pace.