Description List
Server ComponentSemantic dl/dt/dd pairs in stacked, horizontal, or grid-card layouts for detail panes and order summaries.
Import
import { DescriptionList } from "@cronus-ui/ui";
npx cronus-ui add description-list
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component DescriptionListDefault layout:inline style:description-list {
aria-label:"Details"
label "Details"
text "Name"
text "Ada"
text "Status"
text "Paid"
}
page "/audit/description-list/default" type:custom {
use DescriptionListDefault
}
API Reference
Generated from the component's exported types.
DescriptionListProps
Extends HTMLAttributes<HTMLDListElement>, VariantProps<typeof descriptionListVariants>
| Prop | Type | Default | Description |
|---|---|---|---|
layout | "stacked" | "horizontal" | "grid" | "stacked" | How term/details pairs are arranged. `stacked` places each term above its details; `horizontal` aligns them into classic two-column rows with a divider between rows; `grid` spreads grouped pairs across a responsive 1 → 2 → 3 column set of card tiles. |
size | "sm" | "md" | "md" | Density preset controlling the type scale and spacing. |
striped | boolean | false | Tints alternate rows for scannability. The zebra counts only div-wrapped rows — wrap each pair in a row (or a plain `<div>`); raw `<dt>`/`<dd>` pairs are never counted or tinted. |
bordered | boolean | false | Wraps the list in a rounded outer border and insets the content. |
detailsAlign | "start" | "end" | "start" | Alignment of the details column. Logical (`text-start`/`text-end`), so `end` stays correct in RTL. |
asChild | boolean | — | Render as the child element via Slot. |
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |
id | string | — | DOM id of the root element. |
DescriptionItemProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
term* | ReactNode | — | The label rendered in the pair's . |
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
DescriptionTermProps
Extends HTMLAttributes<HTMLElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
DescriptionDetailsProps
Extends HTMLAttributes<HTMLElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |