A semantic key-value surface with responsive split and stacked layouts.
- Workspace
- Product design
- Owner
- Alex Morgan
- Region
- US East
- Created
- September 12, 2026
import {
DescriptionList,
DescriptionItem,
} from "@/components/ballmac/description-list"
export default function DescriptionListDemo() {
return (
<DescriptionList className="w-full max-w-sm">
<DescriptionItem label="Workspace" value="Product design" />
<DescriptionItem label="Owner" value="Alex Morgan" />
<DescriptionItem label="Region" value="US East" />
<DescriptionItem label="Created" value="September 12, 2026" />
</DescriptionList>
)
}Installation
$ pnpm dlx shadcn@latest add @ballmac/description-listCopy the source into your project.
components/ballmac/description-list.tsx// Ballmac UI: Description List. https://ui.ballmac.com/components/description-list import * as React from "react" import { cn } from "@/lib/utils" type DescriptionListProps = React.ComponentProps<"dl"> & { /** Align terms and details in two columns on larger screens. */ layout?: "stacked" | "split" } type DescriptionItemProps = React.ComponentProps<"div"> & { /** Field label. */ label: string /** Field value. */ value: React.ReactNode } function DescriptionList({ className, layout = "split", ...props }: DescriptionListProps) { return ( <dl data-slot="description-list" data-layout={layout} className={cn( "group/description-list bg-card min-w-0 divide-y divide-border rounded-xl border border-border", className, )} {...props} /> ) } function DescriptionItem({ className, label, value, ...props }: DescriptionItemProps) { return ( <div data-slot="description-item" className={cn( "group-data-[layout=split]/description-list:sm:grid group-data-[layout=split]/description-list:sm:grid-cols-[minmax(0,10rem)_minmax(0,1fr)] group-data-[layout=split]/description-list:sm:gap-4 px-4 py-3 first:rounded-t-xl last:rounded-b-xl", className, )} {...props} > <dt className="text-muted-foreground text-sm font-medium">{label}</dt> <dd className="mt-1 min-w-0 break-words text-sm sm:mt-0">{value}</dd> </div> ) } export { DescriptionList, DescriptionItem, type DescriptionListProps, type DescriptionItemProps, }Update the import paths to match your project setup.
Usage
import { DescriptionList, DescriptionItem } from "@/components/ballmac/description-list"The full example is in the Code tab above.
Examples
States and variants
- Deployment
- Preview
- Commit
a1b2c3d
import {
DescriptionList,
DescriptionItem,
} from "@/components/ballmac/description-list"
export default function DescriptionListStates() {
return (
<DescriptionList layout="stacked" className="w-full max-w-sm">
<DescriptionItem label="Deployment" value="Preview" />
<DescriptionItem
label="Commit"
value={<code className="font-mono text-xs">a1b2c3d</code>}
/>
</DescriptionList>
)
}API reference
<DescriptionList>
| Prop | Type | Default |
|---|---|---|
layoutAlign terms and details in two columns on larger screens. | "stacked" | "split" | "split" |
<DescriptionItem>
| Prop | Type | Default |
|---|---|---|
label*Field label. | string | — |
value*Field value. | React.ReactNode | — |
Also accepts the standard attributes of its root element.
Accessibility
| Key | Action |
|---|---|
| None | Static content is announced with semantic structure |
Use with AI
A semantic key-value surface with responsive split and stacked layouts. With the shadcn MCP server set up (guide), ask your agent:
Add the Ballmac UI Description List (@ballmac/description-list) to this project with the shadcn MCP, then use it where it fits.
Use it for
- Display read-only properties for an object
Not for
- Use a form for editable fields
Registry JSON: https://ui.ballmac.com/r/description-list.json
Credits
Free to use in personal and commercial projects.
- npm
- None
- Registry
- shadcn/utils
Pairs well with
Card
A composable content surface with compact spacing, an action slot, and optional interactive feedback.
Activity Feed
A compact actor and action feed with timestamps and an empty state.
Audio Player
A podcast-style audio player: play and pause, skip back and forward, a scrubber with chapter ticks, a named current chapter and a speed control. Works with a real file or as a silent demo.
Avatar Circles
Overlapping avatars that spread on hover, lift individually with a name and role tooltip, show presence, fall back to initials and end in a +N count that can be a button.