EXEPERTAI LAB

Research alpha

Time Machine
EXEPERTAI LAB
GALLERY / COLLECTION
← Browse Astryx gallery
List·component·@astryxdesign/core

List

List container with density, dividers, and header support.

Open in Playground @astryxdesign/core/List

Showcases and examples

5 documented examples

List

List API entry

Preview loads on approachPreview loads on approach
Exact source · list-showcase
// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {List, ListItem} from '@astryxdesign/core/List';

export default function ListShowcase() {
  return (
    <List>
      <ListItem label="Notifications" description="Manage your alerts" />
      <ListItem label="Privacy" description="Control your data" />
      <ListItem label="Security" description="Password and 2FA" />
    </List>
  );
}

Usage

A vertical collection of items with consistent spacing, dividers, and optional markers. Supports headers, icons, avatars, badges, and interactive items with click or link behavior. Use it to display ordered or unordered groups of related content.

  • Provide a header to label the list and give context to screen readers.
  • Use start and end content slots to add icons, avatars, or badges to each item.
  • Place interactive elements inside an interactive list item; it creates nested click targets and confusing focus behavior.
  • Use a list for a single item or for laying out unrelated content; lists imply a meaningful collection.
  • Mix clickable and non-clickable items in the same list without clear visual distinction.

Typed props

PropType and behavior
childrenReactNode
List items (ListItem components).
Slot: ListItem
density'compact' | 'balanced' | 'spacious' · default 'balanced'
Spacing density for items.
hasDividersboolean · default false
Show dividers between items.
edgeCompensation'inline'
Compensate for item content inset on each inline edge by cancelling the smaller of each item's built-in horizontal inset and the container's published inline padding. The margin reads the same variable the items derive their inline padding from, so it tracks density and theme padding overrides automatically without pulling rows outside zero-padding or full-bleed surfaces. Use under a section heading to bring row text toward the heading text. Content aligns when container padding is at least the item inset; smaller padding leaves some inset uncompensated. Omit to leave item positions unchanged.
headerReactNode
Header content, associated with the list via aria-labelledby.
Slot: Text
listStyle'none' | 'disc' | 'decimal' | 'circle' · default 'none'
List marker style. 'decimal' renders an <ol> element instead of <ul>.
startnumber · default 1
Starting number for ordered lists (listStyle='decimal'). Sets the CSS counter to begin at this value.
xstyleStyleXStyles
StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value: not an inline style object like style={{}}.

Anatomy

List title · required

Heading that labels the list.

Description · optional

Supplementary text below the title.

List items · required

Individual entries, which may include icons or images.

Item description · optional

Additional detail for an individual list item.

Theming

Targets

astryx-list

Visual props: density, listStyle

astryx-list-item