Skip to content
Alea0.1
Pro
  1. Alea
  2. Components
  3. Data display
  4. StructuredList

Data display

StructuredList

Rows of facts in columns, lighter than a table: plan comparisons, settings summaries, specs. With selectionMode="single" each row is a choice. On phones each row stacks its cells with their labels.

import { StructuredList } from '@alea/ui';

Examples

StructuredList

Rows of facts in columns, lighter than a table. With selectionMode="single" each row is a choice. On phones each row stacks its cells with their labels.

PlanSeatsStoragePer month
Free11 GB$0
Pro5100 GB$12
TeamUnlimited1 TB$40

Tokens

The design tokens this component reads, with their value in the current theme. Override any of them to restyle it.

Color

  • --alea-accent…
  • --alea-accent-on…
  • --alea-accent-subtle…
  • --alea-border…
  • --alea-border-control…
  • --alea-focus…
  • --alea-surface-hover…
  • --alea-text-muted…

Space

  • --alea-space-4…

Radius

  • --alea-radius-sm…

Type

  • --alea-font-size-md…
  • --alea-font-size-xs…
  • --alea-font-weight-semibold…

Motion

  • --alea-motion-duration-fast…

Props

StructuredList props

Rows of facts in columns, lighter than a table: plan comparisons, settings summaries. With selectionMode="single", each row is a choice. On phones each row stacks its cells.

PropTypeDefaultDescription
aria-labelrequiredstring-Name for screen readers.
columnsrequired{ key: keyof T & string; label: ReactNode; align?: "start" | "end" | undefined; width?: string | undefined; }[]-The columns: key in each row, header, and alignment.
rowsrequiredT[]-The rows.
classNamestring-Extra class names.
defaultValuestring-The chosen row at first.
onChange((id: string) => void)-Called with the chosen row id.
selectionMode"single" | "none"'none'single: each row is a choice (a radio), for plans and options compared side by side. Default none.
showHeaderbooleantrueShows the column headers. Default true.
valuestring-The chosen row id (controlled).

Specs

Generated from the source: the variants in the types, the states and tokens in the CSS, and the motion patterns that apply. The grids render the real component in both themes; the numbers are measured from the page.

Variants
selectionModesinglenone
States
HoverSelectedKeyboard focus
Dark and light
Every color comes from theme tokens, so it follows data-theme (and presets like Graphite) on the page or any wrapper. Contrast is checked in both themes.
Styling hooks
.alea-slist-row.alea-slist-head.alea-slist-cell.alea-slist.alea-slist-option.alea-slist-check
Data attributes
data-align=enddata-label

Accessibility

  • Read only, it is a table with column headers and row headers.
  • With selection, it is a radio group: arrows move between rows and the chosen one is announced.

Keyboard

KeyDoes
Arrow Up / DownMove between choices (selection)
SpaceChoose the row

Do and don't

Do

  • Keep it to a few columns; use Table or DataGrid for sorting and many rows.

Don't

  • Don't put buttons in selectable rows.
Tested with axe, keyboard and screen reader roles