Data displayDescriptionList
Searchastronomic.dev# DescriptionList
For short facts as label and value pairs, like client, year and services.
Static: no JavaScript.
## Usage
```astro
import DescriptionList from "@astronomic-dev/ui/components/DescriptionList.astro";
```
## Examples
### Project facts
```astro
---
import DescriptionList from "@astronomic-dev/ui/components/DescriptionList.astro";
const facts = [
{ term: "Client", detail: "Northwind Logistics" },
{ term: "Year", detail: "2025" },
{ term: "Services", detail: ["Brand identity", "Websites"] },
{ term: "Status", detail: { label: "Live since March", status: "positive" as const } },
{ term: "Links", detail: [{ label: "northwind.example", href: "#northwind" }] },
];
---
<DescriptionList items={facts} />
```
### 44px on touch
touchTargets: on a touch screen each link is a real box at least 44px tall, so no two hit areas overlap.
```astro
---
import DescriptionList from "@astronomic-dev/ui/components/DescriptionList.astro";
const facts = [
{ term: "Client", detail: "Northwind Logistics" },
{ term: "Links", detail: [{ label: "northwind.example", href: "#northwind" }, { label: "Press kit", href: "#press" }, { label: "Case film", href: "#film" }] },
];
---
<DescriptionList items={facts} touchTargets />
```
## Props
### DescriptionList
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` | `{ term, detail }[]` | None | Required. Each detail is text, a status ({ label, status }) shown with the Badge dot, or a list of text and { label, href } links. |
| `touchTargets` | `boolean` | `false` | On a touch screen (a coarse pointer), each link in a list value is a real box at least 44px tall (touchBox), so stacked links never share a hit area. Opt-in only to keep other themes' HTML the same; the kit plans to make it the default at the next baseline. |
| `class` | `string` | None | More classes, merged with cn(), so yours win on conflicts. |
Any other attribute goes on the <dl>.
## Accessibility
- Renders a <dl>, so each term is read with its value.
- A value with several items is a list, and items with href are links. Set touchTargets for a 44px box around each link on touch (WCAG 2.5.5).
- A status value keeps the Badge dot as decoration, so its text must say the state.
DescriptionList
FreeFor short facts as label and value pairs, like client, year and services.
- File
- DescriptionList.astro
- Group
- Data display
- Kind
- Static: no JavaScript
- Examples
- 2
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Project facts
- Client
- Northwind Logistics
- Year
- 2025
- Services
- Brand identity
- Websites
- Status
- Live since March
- Links
Force statemain.astro
examples/descriptionlist/main.astro
---
import DescriptionList from "@astronomic-dev/ui/components/DescriptionList.astro";
const facts = [
{ term: "Client", detail: "Northwind Logistics" },
{ term: "Year", detail: "2025" },
{ term: "Services", detail: ["Brand identity", "Websites"] },
{ term: "Status", detail: { label: "Live since March", status: "positive" as const } },
{ term: "Links", detail: [{ label: "northwind.example", href: "#northwind" }] },
];
---
<DescriptionList items={facts} />44px on touch
touchTargets: on a touch screen each link is a real box at least 44px tall, so no two hit areas overlap.
This preview did not load.
touch.astro
examples/descriptionlist/touch.astro
---
import DescriptionList from "@astronomic-dev/ui/components/DescriptionList.astro";
const facts = [
{ term: "Client", detail: "Northwind Logistics" },
{ term: "Links", detail: [{ label: "northwind.example", href: "#northwind" }, { label: "Press kit", href: "#press" }, { label: "Case film", href: "#film" }] },
];
---
<DescriptionList items={facts} touchTargets />Minimal · Light