Skip to content
Vertical Jump Designs-uiFront-End Studio
Get Pro

v3.9 is out.

Data display

List

Free1.8 KB gzipped

A semantic list (<ul> or <ol>) with styled markers and rich items.

Accessibility: WCAG 2.2 AA · No A or AA violations in light or dark mode · Keys: Tab · Full report

Import

tsx
import { List } from "@vjdesigns/vjdesigns-ui";

Importing only List adds about 1.8 KB of minified, gzipped JavaScript to your app (React not included). The stylesheet is shared by every component and loaded once: 75.1 KB gzipped.

Examples

Divided

Items have start, title, description, meta and end slots.

  • JL
    Jordan Lee Product designer
    Admin
  • SR
    Sam Rivera Engineer
    Member
  • PP
    Priya Patel Engineer
    Member
tsx
import { Avatar, Badge, List } from "@vjdesigns/vjdesigns-ui";

export function Divided() {
  return (
    <List variant="divided" style={{ width: "100%", maxWidth: "28rem" }}>
      <List.Item
        start={<Avatar name="Jordan Lee" colorFromName />}
        title="Jordan Lee"
        description="Product designer"
        end={<Badge tone="success">Admin</Badge>}
      />
      <List.Item start={<Avatar name="Sam Rivera" colorFromName />} title="Sam Rivera" description="Engineer" end={<Badge>Member</Badge>} />
      <List.Item start={<Avatar name="Priya Patel" colorFromName />} title="Priya Patel" description="Engineer" end={<Badge>Member</Badge>} />
    </List>
  );
}

Interactive

List.ItemButton and List.ItemLink make whole rows interactive. List.Subheader goes before the list, which points to it with aria-labelledby.

Recent

tsx
import {
  ChevronRightIcon,
  FileIcon,
  FolderIcon,
  List,
} from "@vjdesigns/vjdesigns-ui";

export function Interactive() {
  return (
    <div style={{ width: "100%", maxWidth: "28rem" }}>
      <List.Subheader id="recent-files">Recent</List.Subheader>
      <List variant="card" aria-labelledby="recent-files">
        <List.ItemButton start={<FolderIcon />} title="Brand assets" meta="Today" end={<ChevronRightIcon />} />
        <List.ItemButton start={<FileIcon />} title="Q3 roadmap.pdf" meta="Yesterday" end={<ChevronRightIcon />} selected />
        <List.ItemLink href="#example-interactive" start={<FileIcon />} title="Launch checklist" meta="Mon" end={<ChevronRightIcon />} />
      </List>
    </div>
  );
}

Numbered

  1. Install the package.
  2. Import the stylesheet once.
  3. Use the components.
tsx
import { List, Text } from "@vjdesigns/vjdesigns-ui";

export function Numbered() {
  return (
    <List variant="numbered" spacing={2}>
      <List.Item>Install the package.</List.Item>
      <List.Item>Import the stylesheet once.</List.Item>
      <List.Item>
        <Text as="span">Use the components.</Text>
      </List.Item>
    </List>
  );
}

Accessibility

selected (or current) shows the state with a leading bar as well as a tint, and sets aria-current, so it's announced rather than only seen. List.ItemLink makes each row a single link.

tsx
import { FileIcon, FolderIcon, List } from "@vjdesigns/vjdesigns-ui";

export function Accessibility() {
  const skip = (event: { preventDefault: () => void }) => event.preventDefault();
  return (
    <List variant="card" style={{ width: "100%", maxWidth: "24rem" }}>
      <List.ItemLink href="#inbox" onClick={skip} selected start={<FolderIcon />} title="Inbox" meta="12 unread" />
      <List.ItemLink href="#drafts" onClick={skip} start={<FileIcon />} title="Drafts" meta="3" />
      <List.ItemLink href="#archive" onClick={skip} start={<FolderIcon />} title="Archive" />
    </List>
  );
}

Translated

In Arabic the list mirrors: leading icons and markers sit on the right and trailing details on the left. The text is your own.

  • المستندات 12 ملفًا
  • الصور 248 صورة
  • العقد.pdf آخر تعديل أمس
tsx
import {
  ChevronRightIcon,
  FileIcon,
  FolderIcon,
  List,
  LocaleProvider,
} from "@vjdesigns/vjdesigns-ui";
import ar from "@vjdesigns/vjdesigns-ui/locales/ar";

export function Translated() {
  return (
    <LocaleProvider locale="ar" messages={ar}>
      <List variant="divided" style={{ width: "100%", maxWidth: "24rem" }}>
        <List.Item start={<FolderIcon />} title="المستندات" description="12 ملفًا" end={<ChevronRightIcon />} />
        <List.Item start={<FolderIcon />} title="الصور" description="248 صورة" end={<ChevronRightIcon />} />
        <List.Item start={<FileIcon />} title="العقد.pdf" description="آخر تعديل أمس" />
      </List>
    </LocaleProvider>
  );
}

Usage notes

Every variant draws its own markers, so the browser's markers are removed with CSS; role="list" is added so Safari and VoiceOver keep announcing the list and its item count.

This is a list, not a listbox: items are not selectable options and there is no roving focus. Interactive items (List.ItemButton, List.ItemLink) are ordinary Tab stops. For choosing among options, use a Listbox, Combobox, or Select instead.

Grouping: put a List.Subheader (a real heading by default) before each list and point the list at it with aria-labelledby, so screen readers announce "Account, list, 3 items".

API reference

List

List props
PropTypeDefault
variant

Visual style.

"plain""bulleted""numbered""divided""card""plain"
as

List element. Defaults to "ol" for variant="numbered" or ordered, otherwise "ul".

"ul""ol"—
ordered

Shortcut for as="ol": the items have a meaningful order.

booleanfalse
size

Type size, marker size, and item padding.

"sm""md""lg""md"
spacing

Space between items, as a --space-* step. For plain, bulleted, and numbered it is the gap between items; for divided and card (where a gap would break the dividers) it is each item's block padding. Defaults to a step that scales with size.

Space—
marker

A custom marker for every item, such as <CheckIcon /> for a feature list. Replaces the variant's dot or number. Decorative: hidden from assistive technology, so the item text must carry the meaning.

ReactNode—
start

For ordered lists: the number of the first item.

number1
children

The items: List.Item, List.ItemButton, or List.ItemLink.

ReactNode—
ref

Ref to the <ul> or <ol>.

Ref<HTMLUListElement | HTMLOListElement>—

Also accepts native <ol> attributes, plus className, style and ref.

List.Item

List.Item props
PropTypeDefault
start

Leading visual: an Avatar, an Icon, or a thumbnail.

ReactNode—
title

Primary text, in bold display type.

ReactNode—
description

Secondary text under the title, in muted body type.

ReactNode—
meta

End-aligned secondary text, such as a timestamp or a count.

ReactNode—
end

Trailing content: actions (IconButton, Switch), Badges, or a chevron. On ItemButton and ItemLink these stay independently clickable and focusable; they sit above the stretched main action.

ReactNode—
marker

Overrides the list's marker for this item. undefined inherits the list's marker; false removes the marker. Decorative and hidden from assistive technology.

ReactNode—
selected

Highlights the item with a tinted fill and a leading bar (shape plus color). Also sets aria-current ("page" on links, "true" otherwise) so the state is announced, not only seen.

booleanfalse
current

Sets a specific aria-current token (e.g. "step"). Implies selected.

"page""step""location""date""time""true"—
children

Plain content. Renders after the title and description, or alone when no slots are used.

ReactNode—

Also accepts native <li> attributes, plus className, style and ref.

List.ItemButton

List.ItemButton props
PropTypeDefault
disabled

Disables the main action. end actions keep their own disabled state.

booleanfalse
className

Class for the row (<li>). Other props go to the <button> or <a>.

string—
style

Style for the row (<li>).

CSSProperties—
itemProps

Extra props for the row <li>, such as data-* attributes or an id.

Omit<ComponentPropsWithRef<"li">, "children">—
start

Leading visual: an Avatar, an Icon, or a thumbnail.

ReactNode—
title

Primary text, in bold display type.

ReactNode—
description

Secondary text under the title, in muted body type.

ReactNode—
meta

End-aligned secondary text, such as a timestamp or a count.

ReactNode—
end

Trailing content: actions (IconButton, Switch), Badges, or a chevron. On ItemButton and ItemLink these stay independently clickable and focusable; they sit above the stretched main action.

ReactNode—
marker

Overrides the list's marker for this item. undefined inherits the list's marker; false removes the marker. Decorative and hidden from assistive technology.

ReactNode—
selected

Highlights the item with a tinted fill and a leading bar (shape plus color). Also sets aria-current ("page" on links, "true" otherwise) so the state is announced, not only seen.

booleanfalse
current

Sets a specific aria-current token (e.g. "step"). Implies selected.

"page""step""location""date""time""true"—
children

Plain content. Renders after the title and description, or alone when no slots are used.

ReactNode—

Also accepts native <button> attributes, plus className, style and ref.

List.ItemLink props
PropTypeDefault
disabled

Disables the main action. end actions keep their own disabled state.

booleanfalse
className

Class for the row (<li>). Other props go to the <button> or <a>.

string—
style

Style for the row (<li>).

CSSProperties—
itemProps

Extra props for the row <li>, such as data-* attributes or an id.

Omit<ComponentPropsWithRef<"li">, "children">—
start

Leading visual: an Avatar, an Icon, or a thumbnail.

ReactNode—
title

Primary text, in bold display type.

ReactNode—
description

Secondary text under the title, in muted body type.

ReactNode—
meta

End-aligned secondary text, such as a timestamp or a count.

ReactNode—
end

Trailing content: actions (IconButton, Switch), Badges, or a chevron. On ItemButton and ItemLink these stay independently clickable and focusable; they sit above the stretched main action.

ReactNode—
marker

Overrides the list's marker for this item. undefined inherits the list's marker; false removes the marker. Decorative and hidden from assistive technology.

ReactNode—
selected

Highlights the item with a tinted fill and a leading bar (shape plus color). Also sets aria-current ("page" on links, "true" otherwise) so the state is announced, not only seen.

booleanfalse
current

Sets a specific aria-current token (e.g. "step"). Implies selected.

"page""step""location""date""time""true"—
children

Plain content. Renders after the title and description, or alone when no slots are used.

ReactNode—

Also accepts native <a> attributes, plus className, style and ref.

List.Subheader

List.Subheader props
PropTypeDefault
as

Element to render. A heading (default h3) so grouped lists show up in the screen reader's headings list; pick the level that fits the page outline, or div when a heading would be out of place.

"h2""h3""h4""h5""h6""div""h3"
size

Type size, matching the list's size.

"sm""md""lg""md"
children

The group label.

ReactNode—

Also accepts native <h3> attributes, plus className, style and ref.

See what changed in each version in the Changelog.

Accessibility report

List targets WCAG 2.2 AA. Below: a live axe-core audit of this page's examples, Lighthouse scores for the page in both modes, the accessibility behavior built into the component, and the checks only a person can do.

axe-core audit (live)

Running accessibility audit

Checking the examples above…

Lighthouse audit

Light mode

Score 100

35 passed · 0 failed · 30 not applicable · 10 to check by hand

Dark mode

Score 100

35 passed · 0 failed · 30 not applicable · 10 to check by hand

Lighthouse 13.5.0 audits the whole docs page (header and sidebar included), not just the examples, in English. Last run 11/27/2026. Some failed audits carry no weight in the score, so a page can score 100 and still list one.

Built-in behavior

Keyboard

Keyboard
KeyAction
TabMoves through interactive items (ListItemButton, ListItemLink); plain items aren't tab stops.

Roles and states

Roles and states
ElementRoleStates and properties
<ul> / <ol>list—
Itemlistitem—
ListItemButton / ListItemLinkbutton / linkaria-current when selected, aria-describedby → secondary text

Manual checks

Automated tools find roughly a third of accessibility issues. Test these in your app, with your content.

Manual accessibility checks
CheckWhat to testWCAG 2.2
KeyboardEvery action works with Tab, Shift+Tab, Enter, Space and the arrow keys, and focus never gets stuck.2.1.1 (A), 2.1.2 (A)
FocusFocus moves in a logical order, is always visible, and isn't hidden behind sticky headers.2.4.3 (A), 2.4.7 (AA), 2.4.11 (AA), 2.4.13 (AAA)
Screen readersNames, roles and states are announced correctly, and status changes are announced without moving focus.1.3.1 (A), 4.1.2 (A), 4.1.3 (AA)
ColorMeaning never depends on color alone; your own colors meet contrast in both modes.1.4.1 (A), 1.4.3 (AA), 1.4.11 (AA), 1.4.6 (AAA)
Zoom and reflowAt 200% text size and at 320px wide (400% zoom), nothing is cut off and no sideways scrolling is needed.1.4.4 (AA), 1.4.10 (AA), 1.4.12 (AA)
Pointer targetsClick and tap targets are at least 24×24px (44×44px for AAA), or spaced so they don't overlap.2.5.8 (AA), 2.5.5 (AAA)
MotionAnimations respect the reduced-motion setting.2.3.3 (AAA)