Skip to content

Metadata List

@astryxdesign/core v0.7.1 · MetadataList

Props ​

MetadataList ​

NameTypeDefaultDescription
columns'multi' | 'single' | number'single'One column keeps the label beside the value. A number or multi stacks the label above the value. multi fills tracks of at least 280px.
label{ position?: 'start' | 'top', width?: number | string }beside the value for one column, above it otherwisewidth sizes the label track and only applies when the label sits beside the value. Numbers are pixels.
maxNumOfItemsnumber-Items past this count sit behind a show more control. Ignored when the list is horizontal.
orientation'vertical' | 'horizontal''vertical'Horizontal flow wraps pairs in a row and ignores columns, label, and maxNumOfItems.
titlestring-Plain title above the pairs. Use the title slot for rich content.

MetadataListItem ​

NameTypeDefaultDescription
labelstring-The name of the field. The default slot is the value. The icon slot draws a leading icon.

Theming ​

packages/core/styles/metadata-list.css reads semantic tokens. Labels use the body size at medium weight and the secondary text color. Values use the primary text color. Side-by-side pairs have an 8px row gap and a 16px column gap, and the value row is at least 24px tall. Stacked pairs use a 2px gap. The title has 12px of space below it. The show more control uses the accent color.

Native attributes ​

Attributes fall through to the root <dl> and to each item's <dt> or wrapping element.