List

Vertical list of interactive or static items. Supports subheaders, leading icons and avatars, secondary text, trailing actions, selected and disabled states.

import{ List, ListItem } from "@pepulux/ui"

Basic list with dividers

Simple text items with bottom borders.

Inbox

4 new messages

Sent

12 messages

Drafts

2 drafts

With leading icons

Pass any ReactNode as leading. Icons are rendered in text-n-500.

Inbox

4 new messages

Sent

12 messages

Archive

Trash

With leading avatars

Use the leading slot for avatars in contact/user lists.

O

Olivia Rhye

olivia@example.com

P

Phoenix Baker

phoenix@example.com

L

Lana Steiner

lana@example.com

With trailing actions and badges

Pass a ReactNode as trailing — icon buttons, chevrons, or unread counts.

Inbox

4 unread

Starred

Archive

Trash

With subheader and selected state

List.subheader adds a section label. selected prop highlights the active item.

Folders

Inbox

Sent

Drafts

Trash

Disabled items

Individual items can be disabled — they appear dimmed and non-interactive.

Available

Disabled option

Also available

Props

PropTypeDefaultDescription
subheaderstringSection label displayed above the list items
densebooleanfalseReduces vertical padding on each item
disablePaddingbooleanfalseRemoves top/bottom padding on the list wrapper
children*ReactNodeListItem children
classNamestringAdditional CSS classes on the list wrapper

Props

PropTypeDefaultDescription
primary*stringMain line text
secondarystringSmaller sub-text below primary
leadingReactNodeIcon, avatar, or other element on the left
trailingReactNodeIcon button, count badge, or chevron on the right
onClick() => voidMakes the item interactive — adds hover background and pointer cursor
selectedbooleanfalseHighlights item with brand-subtle background
disabledbooleanfalseDims and prevents interaction
dividerbooleanfalseAdds a bottom border (last item border suppressed)
classNamestringAdditional CSS classes on the item wrapper