A single-column interactive list with keyboard navigation, selection, and accessible item actions — built on RAC GridList.
The ListView component displays a list of interactive items with built-in keyboard navigation, typeahead search, and selection.
ListView supports three selection modes: none (read-only), single (radio-style), and multiple (checkboxes). Selection checkboxes are rendered automatically when selection is enabled.
// No selection
<ListView aria-label="Files" selectionMode="none">
...
</ListView>
// Single selection
<ListView aria-label="Files" selectionMode="single">
...
</ListView>
// Multiple selection
<ListView
aria-label="Files"
selectionMode="multiple"
selectedKeys={selected}
onSelectionChange={setSelected}
>
...
</ListView>The default variant. Gray background wrapper with white surface items forming a card shape.
No background wrapper. Items are transparent with bottom borders. Uses primary (accent) checkboxes for contrast.
Use the disabledKeys prop to disable specific items. Disabled items cannot be selected, focused, or interacted with.
<ListView
aria-label="Files"
disabledKeys={["3", "5"]}
selectionMode="multiple"
>
...
</ListView>Combine with ActionBar for bulk selection workflows. The ActionBar appears when items are selected and provides contextual actions.
import {ListView} from "@heroui-pro/react";
<ListView aria-label="Files" items={files} selectionMode="multiple">
{(file) => (
<ListView.Item id={file.id} textValue={file.name}>
<ListView.ItemContent>
<FileIcon />
<div>
<ListView.Title>{file.name}</ListView.Title>
<ListView.Description>{file.size}</ListView.Description>
</div>
</ListView.ItemContent>
<ListView.ItemAction>
<Button isIconOnly size="sm" variant="ghost">
<Ellipsis />
</Button>
</ListView.ItemAction>
</ListView.Item>
)}
</ListView>.list-view — Root container. Sets min-height: 0, width: 100%, and outline: none..list-view--primary — Gray background wrapper with padding and large border-radius. Items have white surface backgrounds..list-view--secondary — No background or padding. Items are transparent with bottom borders..list-view__item — Individual row. Flex layout with gap, padding, and interactive states..list-view__item-content — Main content area (icon + text). Flex with min-width: 0 for truncation..list-view__title — Primary text. Truncated, text-sm font-medium..list-view__description — Secondary text. Truncated, text-xs text-muted..list-view__item-action — Trailing action slot. Auto-margin to the end..list-view__selection-cell — Checkbox area. Fixed width, flex-shrink: 0..list-view__empty-state — Centered empty state container.bg-surface/40 (primary) or bg-default/50 (secondary).bg-surface/10 (primary) or bg-accent-soft (secondary).box-shadow: inset 0 0 0 2px var(--color-focus).status-disabled utility.opacity: 0.5.The root list component. Accepts a generic type parameter T for the item data shape. Extends RAC GridListProps.
| Prop | Type | Default | Description |
|---|---|---|---|
aria-label | string | — | Accessible label for the list. Required. |
variant | "primary" | "secondary" | "primary" | Visual variant. |
selectionMode | "none" | "single" | "multiple" | "none" | Item selection mode. |
selectedKeys | Selection | — | Controlled selected item keys. |
defaultSelectedKeys | Selection | — | Default selected keys (uncontrolled). |
onSelectionChange | (keys: Selection) => void | — | Callback when selection changes. |
selectionBehavior | "toggle" | "replace" | "toggle" | Selection interaction model. |
items | Iterable<T> | — | Item objects for dynamic collections. |
disabledKeys | Iterable<Key> | — | Keys of items that should be disabled. |
onAction | (key: Key) => void | — | Callback when a user performs an action on an item. |
renderEmptyState | () => ReactNode | — | Render function for the empty state. |
virtualized | boolean | false | Enable row virtualization for large datasets. |
rowHeight | number | 48 | Estimated row height in pixels for virtualization. |
className | string | — | Additional CSS classes. |
children | ReactNode | ((item: T) => ReactNode) | — | Static items or render function for dynamic collections. |
Individual list item. Extends RAC GridListItemProps.
| Prop | Type | Default | Description |
|---|---|---|---|
id | Key | — | Unique item identifier. |
textValue | string | — | String representation for typeahead and accessibility. |
isDisabled | boolean | — | Whether the item is disabled. |
href | string | — | URL to navigate to when the item is actioned. |
children | ReactNode | — | Item content — typically ItemContent and optionally ItemAction. |
className | string | — | Additional CSS classes. |
Main content container for the item (icon/avatar + text).
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Icon, avatar, title, description. |
className | string | — | Additional CSS classes. |
Primary text element inside an item.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Title text. |
className | string | — | Additional CSS classes. |
Secondary/muted text element inside an item.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Description text. |
className | string | — | Additional CSS classes. |
Trailing action slot inside an item.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Action buttons, menus, icons. |
className | string | — | Additional CSS classes. |