XDSMetadataList@xds/core · MetadataList

Usage

MetadataList displays key-value pairs for object attributes like quality, condition, and status, in a structured layout. Use it for detail panels, settings summaries, and record information.

Best practices

GuidancePractices
DoChoose label position based on content — "start" for short values, "top" for long or complex values.
DoCollapse long lists with `maxNumOfItems` to keep the page scannable.
Don'tUse for extensive form input — use a form layout instead.
Don'tUse for data that doesn't have a clear key-value structure.

Anatomy

ElementDescription
TitleOptional title for the metadata list.
LabelrequiredThe key label for each metadata entry.
MetadatarequiredThe value displayed in various formats.
DisclosureCollapse/expand control for the list.

Import

ts
import {XDSMetadataList} from '@xds/core/MetadataList'

Props

PropTypeDescription
childrenrequired
ReactNodeMetadata items (XDSMetadataListItem components).
columns
'multi' | 'single' | number (default: 'single')Column layout mode.
label
{ position?: 'start' | 'top', width?: number | string } (default: { position: 'start' } (single-column) / { position: 'top' } (multi-column))Label display configuration. position controls label placement, width sets a custom label column width. Defaults to { position: 'top' } for multi-column layouts.
maxNumOfItems
numberMaximum items to show before collapsing with a show more/less toggle.
orientation
'vertical' | 'horizontal' (default: 'vertical')Layout orientation. Horizontal mode flows items in a row with flex-wrap.
title
ReactNodeOptional title or heading above the list.
xstyle
StyleXStylesStyleX styles for layout customization. Must be a stylex.create() value.

Sub-components

MetadataList is a compound component with 2 sub-components.

XDSMetadataList

Container for metadata items with column layout, orientation, and collapse support.
PropTypeDescription
childrenrequired
ReactNodeMetadata items (XDSMetadataListItem components).
columns
'multi' | 'single' | number (default: 'single')Column layout mode.
label
{ position?: 'start' | 'top', width?: number | string } (default: { position: 'start' } (single-column) / { position: 'top' } (multi-column))Label display configuration. position controls label placement, width sets a custom label column width. Defaults to { position: 'top' } for multi-column layouts.
maxNumOfItems
numberMaximum items to show before collapsing with a show more/less toggle.
orientation
'vertical' | 'horizontal' (default: 'vertical')Layout orientation. Horizontal mode flows items in a row with flex-wrap.
title
ReactNodeOptional title or heading above the list.
xstyle
StyleXStylesStyleX styles for layout customization. Must be a stylex.create() value.

XDSMetadataListItem

A single labeled metadata value within an XDSMetadataList.
PropTypeDescription
childrenrequired
ReactNodeContent value for this metadata item.
labelrequired
stringLabel text for this metadata item.
icon
ReactNodeIcon rendered before the label text.

Examples

Common configurations, variations, and states.
MetadataList — BasicSingle-column key-value metadata list.
tsx
'use client';
import {XDSMetadataList, XDSMetadataListItem} from '@xds/core/MetadataList';
export default function MetadataListBasicMetadata() {
return (
<XDSMetadataList>
<XDSMetadataListItem label="Name">XDSMetadataList</XDSMetadataListItem>
<XDSMetadataListItem label="Status">Active</XDSMetadataListItem>
<XDSMetadataListItem label="Owner">Joey</XDSMetadataListItem>
</XDSMetadataList>
);
}
MetadataList — CollapsibleMetadata list with a show-more toggle after a set number of items.
tsx
'use client';
import {XDSMetadataList, XDSMetadataListItem} from '@xds/core/MetadataList';
export default function MetadataListCollapsibleMetadata() {
return (
<XDSMetadataList maxNumOfItems={3}>
<XDSMetadataListItem label="Name">XDSMetadataList</XDSMetadataListItem>
<XDSMetadataListItem label="Status">Active</XDSMetadataListItem>
<XDSMetadataListItem label="Owner">Joey</XDSMetadataListItem>
<XDSMetadataListItem label="Created">Jan 15, 2026</XDSMetadataListItem>
<XDSMetadataListItem label="Updated">Mar 26, 2026</XDSMetadataListItem>
<XDSMetadataListItem label="Priority">Tier 1</XDSMetadataListItem>
</XDSMetadataList>
);
}
MetadataList — HorizontalHorizontal metadata items for compact inline display.
tsx
'use client';
import {XDSMetadataList, XDSMetadataListItem} from '@xds/core/MetadataList';
export default function MetadataListHorizontalMetadata() {
return (
<XDSMetadataList orientation="horizontal">
<XDSMetadataListItem label="Status">Active</XDSMetadataListItem>
<XDSMetadataListItem label="Type">Premium</XDSMetadataListItem>
<XDSMetadataListItem label="Owner">Joey</XDSMetadataListItem>
<XDSMetadataListItem label="Created">Jan 15, 2026</XDSMetadataListItem>
</XDSMetadataList>
);
}
MetadataList — Multi-ColumnMulti-column metadata grid with token tags.
tsx
'use client';
import {XDSMetadataList, XDSMetadataListItem} from '@xds/core/MetadataList';
import {XDSToken} from '@xds/core/Token';
import {XDSHStack} from '@xds/core/Layout';
export default function MetadataListMultiColumnMetadata() {
return (
<XDSMetadataList columns="multi">
<XDSMetadataListItem label="Name">XDSMetadataList</XDSMetadataListItem>
<XDSMetadataListItem label="Status">Active</XDSMetadataListItem>
<XDSMetadataListItem label="Owner">Joey</XDSMetadataListItem>
<XDSMetadataListItem label="Created">Jan 15, 2026</XDSMetadataListItem>
<XDSMetadataListItem label="Tags">
<XDSHStack gap={1}>
<XDSToken label="component" />
<XDSToken label="xds" />
</XDSHStack>
</XDSMetadataListItem>
<XDSMetadataListItem label="Priority">Tier 1</XDSMetadataListItem>
</XDSMetadataList>
);
}

Showcase source

tsx
'use client';
import {XDSMetadataList, XDSMetadataListItem} from '@xds/core/MetadataList';
export default function MetadataListShowcase() {
return (
<XDSMetadataList>
<XDSMetadataListItem label="Name">XDSMetadataList</XDSMetadataListItem>
<XDSMetadataListItem label="Status">Active</XDSMetadataListItem>
<XDSMetadataListItem label="Owner">Joey</XDSMetadataListItem>
</XDSMetadataList>
);
}