Components
- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
- New Users
- 234
- Sales
- £12,340
- Revenue
- 3,450
Installation
pnpm dlx shadcn@latest add https://shark.vini.one/r/data-list.json
Usage
import { DataList, DataListItem, DataListItemLabel, DataListItemValue, } from "@/components/ui/data-list";
<DataList> <DataListItem> <DataListItemLabel>Name</DataListItemLabel> <DataListItemValue>John Doe</DataListItemValue> </DataListItem> <DataListItem> <DataListItemLabel>Email</DataListItemLabel> <DataListItemValue>john@example.com</DataListItemValue> </DataListItem> </DataList>
Orientation
Use the orientation prop to change the orientation of the datalist component.
Horizontal
- First Name
- Jassie
- Last Name
- Bhatia
- jassie@example.com
Vertical
- First Name
- Jassie
- Last Name
- Bhatia
- jassie@example.com
Examples
Info Tip
Render the Hint component within DataListItem to provide additional context to the datalist.
- New Users
- 234
- Sales
- £12,340
- Revenue
- 3,450
Separator
Use the divide-y utility class on DataList to add a separator between items.
- First Name
- Jassie
- Last Name
- Bhatia
- jassie@example.com
- Phone
- 1234567890
- Address
- 1234 Main St, Anytown, USA
API Reference
DataList
Root wrapper for label-value list layout.
| Prop | Type | Default |
|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" |
className | string | - |
asChild | boolean | false |
DataListItem
Single label-value row.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
DataListItemLabel
Label or key for the row.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
DataListItemValue
Value or content for the row.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |