[data-reveal]{opacity:1!important;transform:none!important}
Key / value list
Components

Key / value list

Label and value rows, each value drawn by its type — text, status pill, money, date, link or identifier — with copy buttons.

KeyValueList draws label / value rows split by hairlines: the label on the left, the value right-aligned and drawn by its type. A detail adds a dim note after the value. The list sits in a card by default, with title as the card's eyebrow.

Key / value listKeyValueList
Connecting to the DMS preview…
ConnectingDMS 0.9.53 options set

Usage

src/pages/workspaces/detail.ts
import { KeyValueList } from "@antelopejs/interface-dms/base/key-value-list";

static subscription = KeyValueList({
  title: "$saas.subscription.title",
  fetchUrl: "/api/workspaces/{{params.id}}/subscription", // answers { items }
});

Options

Options of the Key / value list block
OptionTypeDefaultDescription
titleContentstring–Small heading at the top of the card.
empty.title*Contentstring–
empty.descriptionContentstring–
cardAppearancebooleantrueDraws the block on a card; turn it off when it already sits in one.
denseAppearanceboolean–Rows closer together.
currencyAppearancestring–The currency of amounts, as a three-letter code such as EUR.
columnsLayoutnumber1How many columns on a wide screen.

A row (KeyValueListItem) carries a label and a value, plus optional type, tone, to, detail, currency, copy and copyValue. An empty value shows a dash.

typeThe value is drawn as
textPlain text. The default.
statusA pill tinted by tone.
moneyAn amount in currency (or the list's).
dateA localized date from an ISO string.
linkAn accent link to to.
monoAn identifier, in mono.

Recipes

Copy a value

copy: true draws a copy button after the value, which copies it as shown. copyValue copies another text instead — the full URL behind a short label — and draws the button on its own.

{ id: "endpoint", label: "Public endpoint", value: "https://api.example.com/v1", type: "mono", copy: true },
{ id: "thumb", label: "Thumbnail", value: "thumb · 320×320", copyValue: "https://cdn.example.com/m/42/thumb.webp" },

Inside a card

Set card: false to place the list inside a Card or a Section; dense: true tightens the rows for a side panel.

Pitfalls

  • money values are amounts in the currency's unit as you send them; a composed text money parameter, by contrast, takes minor units.
  • A composed value is drawn as text whatever the row's type: its parameters already say how each value is written.

Next steps

Stat group

Figures at a glance instead of facts.

Card

Group the list with its actions.