Search

Search the site

All components

Key Value List

Structured metadata renderer for label/value records.

Default
Request and system metadata presentation.
Request ID
req_9f2a2f1
Status
Completed
Region
eu-west-1
Duration
421ms
1"use client";
2
3import { KeyValueList } from "@/registry/ui";
4
5const metadata = [
6 { key: "Request ID", value: "req_9f2a2f1" },
7 { key: "Status", value: "Completed" },
8 { key: "Region", value: "eu-west-1" },
9 { key: "Duration", value: "421ms" },
10];
11
12export function KeyValueListDefaultExample() {
13 return (
14 <div className="mx-auto w-full max-w-2xl">
15 <KeyValueList items={metadata} />
16 </div>
17 );
18}
Dense
Compact layout for high-density settings screens.
Plan
Pro
Seats
12
Renewal
2026-06-01
1"use client";
2
3import { KeyValueList } from "@/registry/ui";
4
5export function KeyValueListDenseExample() {
6 return (
7 <div className="mx-auto w-full max-w-2xl">
8 <KeyValueList
9 dense
10 items={[
11 { key: "Plan", value: "Pro" },
12 { key: "Seats", value: "12" },
13 { key: "Renewal", value: "2026-06-01" },
14 ]}
15 />
16 </div>
17 );
18}

Installation & source

Install via the shadcn CLI or copy the registry files manually.

bash
npx shadcn@latest add @tt-ui/key-value-list

Props

NameTypeDefaultDescription
items{ key: string; value: ReactNode }[]RequiredRows to render in the list
densebooleanfalseUses tighter vertical spacing