Browse components

List

Maps an items array to a semantic ul of rows. Compose ListItem inside your own ul when rows need trailing badges, amounts or controls.

atoms

Live example

Default usage you can copy and adapt.

Minimal rows

Each item needs id and label. Add more fields in later examples.

Helper line under the label

Optional description renders as muted text beneath the title.

Leading icons

Pass a Lucide icon on rows that need one; omit it where plain text is enough.

Leading avatars

avatar is an image URL. Set avatarAlt for meaningful photos; use "" when decorative. Avatar wins over icon if both are set.

Active row and list chrome

selectedId marks the current row. Wrap the list in list-group for border, padding, and surface styling.

Trailing slot (manual ListItem)

ListItemData has no trailing slot. Compose your own <ul> and pass the trailing snippet on ListItem for badges, status, or short meta.

Item fields + trailing snippet

Set icon on the item; add currency, totals, or labels in trailing only.

Props

The props you are most likely to need, with types and defaults.

Props / API
NameTypeRequiredDefaultDescription
itemsListItem[]Yes[]Array of ListItemData: id, label, optional description, href, icon, avatar, avatarAlt, disabled, link target / rel
ariaLabelstringNoList itemsAccessible label for the list container
selectedIdstringNo—Current selected item id for active styling
showArrowbooleanNotrueToggle the right arrow icon visibility
classstringNo—Additional Tailwind classes on the <ul> (e.g. border, padding, background)
onclick(item, event) => voidNoundefinedCallback fired when an item is clicked