EXEPERTAI LAB

Research alpha

Time Machine
EXEPERTAI LAB
GALLERY / COLLECTION
← Browse Astryx gallery
MetadataList·component·@astryxdesign/core

Metadata List

Container for metadata items with column layout, orientation, and collapse support.

Open in Playground @astryxdesign/core/MetadataList

Showcases and examples

5 documented examples

Metadata List

MetadataList API entry

Preview loads on approachPreview loads on approach
Exact source · metadata-list-showcase
// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {MetadataList, MetadataListItem} from '@astryxdesign/core/MetadataList';

export default function MetadataListShowcase() {
  return (
    <MetadataList>
      <MetadataListItem label="Name">MetadataList</MetadataListItem>
      <MetadataListItem label="Status">Active</MetadataListItem>
      <MetadataListItem label="Owner">Joey</MetadataListItem>
    </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.

  • Choose label position based on content: "start" for short values, "top" for long or complex values.
  • Collapse long lists with maxNumOfItems to keep the page scannable.
  • Use for extensive form input; use a form layout instead.
  • Use for data that doesn't have a clear key-value structure.

Typed props

PropType and behavior
childrenReactNode · required
Metadata items (MetadataListItem 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.
maxNumOfItemsnumber
Maximum 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.
titleReactNode
Optional title or heading above the list.
xstyleStyleXStyles
StyleX styles for layout customization. Must be a stylex.create() value.

Anatomy

Title · optional

Optional title for the metadata list.

Label · required

The key label for each metadata entry.

Metadata · required

The value displayed in various formats.

Disclosure · optional

Collapse/expand control for the list.

Theming

Targets

astryx-metadata-list

Visual props: columns, orientation

astryx-metadata-list-item