Key-value list

Free

Grey labels over their values, as a row's detail shows what an agent did: who started it, who approved it, through which tool, and the result.

npx shadcn@latest add https://pixilui.com/r/key-value-list.json

Preview

Label and value pairs that wrap long values without breaking the grid.

When to use

Use it when

  • Inside a list row's detail: Agents read, Connected by; Started by, Approved by, Through, Did, Result.
  • A short spec of a record in a panel or a card.

Use something else when

  • Many records with the same fields: use the sortable table.
  • Editable settings: use fields.

Installation

Terminal
npx shadcn@latest add https://pixilui.com/r/key-value-list.json

Adds key-value-list.tsx, and installs clsx and tailwind-merge. The URL works in any app with a components.json, with no registry to add first.

Usage

example.tsx
import { KeyValueList } from "@/components/pixilui/key-value-list";

<KeyValueList items={items} />

Fills its container; long values wrap under their label.

API reference

PropTypeDefault
itemsRequiredKeyValueItem[]NONEThe pairs, in order.

Also takes every native <dl> attribute, and a ref.

Keyboard

TabNever takes focus itself; links or buttons inside a value do.

Accessibility

  • A description list (dl, dt, dd), so each value is read with its label.
  • Labels are grey but pass contrast on their surface.

Motion

  • None of its own; it folds with the row that holds it.
List rowA run row shimmers while it works and folds out to show who approved it and what it did.
Sortable tableClick a header and rows glide into order; pick rows and the bulk bar rises.
AvatarEach person keeps one color, picked from their name.

PixilUI Pro opens soon. The first 20 licenses are $99.