Build faster with Premium Chakra UI Components 💎

Learn more
Skip to Content
DocsEnterpriseBlogShowcase
Sponsor

DataList

Used to display a list of similar data items.

SourceStorybookRecipe
New Users
234
Sales
£12,340
Revenue
3,450

Setup

If you don't already have the snippet, run the following command to add the data-list snippet

chakra snippet add data-list

The snippet includes a closed component composition for the DataList component.

Usage

import { DataListItem, DataListRoot } from "@/components/ui/data-list"
<DataListRoot>
  {data.map((item) => (
    <DataListItem key={item.label} label={item.label} value={item.value} />
  ))}
</DataListRoot>

Examples

Sizes

Use the size prop to change the size of the datalist component.

Name
John Doe
Name
John Doe
Name
John Doe

Orientation

Use the orientation prop to change the orientation of the datalist component.

New Users
234
Sales
£12,340
Revenue
3,450

Info Tip

Use the info prop on the DataListItem to provide additional context to the datalist.

New Users
234
Sales
£12,340
Revenue
3,450

Separator

Use the divideY prop on the DataListRoot to add a separator between items.

First Name
Jassie
Last Name
Bhatia
Email
jassie@jassie.dev
Phone
1234567890
Address
1234 Main St, Anytown, USA

Props

Root

PropDefaultType
colorPalette 'gray'
'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink' | 'accent'

The color palette of the component

orientation 'vertical'
'horizontal' | 'vertical'

The orientation of the component

size 'md'
'sm' | 'md' | 'lg'

The size of the component

Previous

Collapsible

Next

Dialog