Record details
Present stable labels and values for an order, account, or profile.
Components / Display
Responsive semantic key-value details with concise item composition.
Last changed in version 0.13.0: Add avatar groups and chips, expand the block gallery, and improve component colors, spacing, and motion.
bunx --bun @getweini/cli@latest add description-listImport the files copied by the install command, then place the component in your Vue template. The text and values in the example belong to your app; change them to fit your task.
<script setup lang="ts">
import Badge from './components/ui/badge/Badge.vue'
import DescriptionList from './components/ui/description-list/DescriptionList.vue'
import DescriptionListItem from './components/ui/description-list/DescriptionListItem.vue'
</script>
<template>
<DescriptionList :columns="2" divided class="w-full max-w-2xl">
<DescriptionListItem label="Customer">Mira Laurent</DescriptionListItem>
<DescriptionListItem label="Status"><Badge variant="success">Paid</Badge></DescriptionListItem>
<DescriptionListItem label="Order">ORD-2048</DescriptionListItem>
<DescriptionListItem label="Total">€128.00</DescriptionListItem>
<DescriptionListItem label="Address" span="full">
24 Rue du Marché, Luxembourg
</DescriptionListItem>
</DescriptionList>
</template>DescriptionList preserves native dl, dt, and dd semantics with responsive columns, spanning, and stacked or inline layouts. Items have no bottom borders.
Present stable labels and values for an order, account, or profile.
Let people scan submitted values before confirming a workflow.
Align terms and values in generously spaced rows.
<script setup lang="ts">
import DescriptionList from './components/ui/description-list/DescriptionList.vue'
import DescriptionListItem from './components/ui/description-list/DescriptionListItem.vue'
</script>
<template>
<DescriptionList divided>
<DescriptionListItem label="Order" layout="inline">ORD-2048</DescriptionListItem>
<DescriptionListItem label="Customer" layout="inline">Mira Laurent</DescriptionListItem>
<DescriptionListItem label="Total" layout="inline">€128.00</DescriptionListItem>
</DescriptionList>
</template>Use three columns and let long content span the full grid.
<script setup lang="ts">
import DescriptionList from './components/ui/description-list/DescriptionList.vue'
import DescriptionListItem from './components/ui/description-list/DescriptionListItem.vue'
</script>
<template>
<DescriptionList :columns="3">
<DescriptionListItem label="Region">Luxembourg</DescriptionListItem>
<DescriptionListItem label="Team">Operations</DescriptionListItem>
<DescriptionListItem label="Owner">Mira Laurent</DescriptionListItem>
<DescriptionListItem span="full">
<template #term>Notes</template>
Customer requested delivery before 17:00.
</DescriptionListItem>
</DescriptionList>
</template>Every public prop, model, event, slot, and exposed member of the installed Vue parts is listed below. “Not set” means you can leave that value out; “Required” means you must provide it. Native HTML attributes also work where the component uses a native element.
| Name | Type or signature | Default | What it does |
|---|---|---|---|
columnsprop | 1 | 2 | 3 | undefined | 1 | Define the columns shown in the table. |
dividedprop | boolean | undefined | false | The compatibility divided prop retains 16px block padding for roomy rows without adding separator lines. |
defaultslot | () => unknown | Required | Content shown inside DescriptionList. |
| Name | Type or signature | Default | What it does |
|---|---|---|---|
labelprop | string | undefined | Not set | Visible or accessible name for this item. |
spanprop | 1 | 2 | 3 | "full" | undefined | 1 | Controls the span behavior of DescriptionListItem. |
layoutprop | "stacked" | "inline" | undefined | "stacked" | Controls the layout behavior of DescriptionListItem. |
termslot | (() => unknown) | undefined | Optional | Content for the term area of DescriptionListItem. |
defaultslot | () => unknown | Required | Content shown inside DescriptionListItem. |
// packages/frameworks/vue/components/description-list/types.ts
export interface DescriptionListProps {
columns?: 1 | 2 | 3
divided?: boolean
}
export interface DescriptionListItemProps {
label?: string
span?: 1 | 2 | 3 | 'full'
layout?: 'stacked' | 'inline'
}