API and Development
KeyValueDataList wraps Radix DataList with Prepared styling. Pass items: KeyValueDataListItem[] where each item declares a label and a typed value (DataListValueKind for text, datetime, badge, icon+text, link, status, etc.). Control layout with orientation (DataListOrientation), trim (DataListTrim), labelMinWidth, mono for monospace plain/text values, and optional emptyValue / emptyLabel for blank cells. Clipboard copy is supported for applicable value kinds via onCopySuccess and alwaysVisibleCopyButtons.
Name | Type | Default | Description |
|---|---|---|---|
|
| — | Array of key-value items to display in the data list. |
|
|
| When true, copy buttons are always visible instead of appearing on hover. |
|
| — | Accessible name for empty values when an item has no |
|
| — | Visual content when a value is null, undefined, or empty; passed as |
|
|
| Minimum width for label columns. Accepts a number (pixels) or CSS string. |
|
|
| Renders plain and text-kind values in a monospace font. |
|
| — | Callback fired after a value is successfully copied to the clipboard. |
|
|
| Layout direction of label-value pairs. |
|
|
| Controls whitespace trimming around the list. |
Interactive examples and edge cases for this component are in Storybook.
Re-exported enums and value types (DataListValueKind, DateTimeFormat, BadgeValue, etc.) define each cell payload—import them from @prepared911/ui-core alongside KeyValueDataList.