Vitral 0.2.18
Data

DescriptionList

Facts about one thing as labels and values — an order, a profile — in a real <dl>, in columns that fold into one when the list is narrow.

Import

main.ts
import { DescriptionList } from '@vitral/vue';

Columns

The columns answer to the list's own width, not the window's: in a narrow panel they fold into one.

Profile
Full name
Ana Souza
Role
Product designer
Email
ana@example.com
Phone
—
About
Leads the design system and the research behind the checkout.
<script setup lang="ts">import { DescriptionList } from '@vitral/vue'; const items = [    { label: 'Full name', value: 'Ana Souza' },    { label: 'Role', value: 'Product designer' },    { label: 'Email', value: 'ana@example.com' },    { label: 'Phone', value: null },    { label: 'About', value: 'Leads the design system and the research behind the checkout.', span: 2 }];</script> <template>    <DescriptionList title="Profile" :items="items" :columns="2" style="width: 100%" /></template>

Bordered

Each fact in a cell of one block, with a value drawn from a slot and an action beside the title.

Order details
Order
#1042
Status
Shipped
Placed
14 Sep 2026
Total
$ 318.00
Ship to
Rua das Flores 120, São Paulo
<script setup lang="ts">import { Button, DescriptionList, Tag } from '@vitral/vue'; const items = [    { key: 'order', label: 'Order', value: '#1042' },    { key: 'status', label: 'Status', value: 'Shipped' },    { key: 'placed', label: 'Placed', value: '14 Sep 2026' },    { key: 'total', label: 'Total', value: '$ 318.00' },    { key: 'address', label: 'Ship to', value: 'Rua das Flores 120, São Paulo', span: 2 }];</script> <template>    <DescriptionList title="Order details" :items="items" :columns="2" bordered style="width: 100%">        <template #extra><Button label="Edit" icon="pencil" size="small" variant="outlined" severity="secondary" /></template>        <template #value="{ item }">            <Tag v-if="item.key === 'status'" :value="String(item.value)" severity="success" />            <template v-else>{{ item.value }}</template>        </template>    </DescriptionList></template>

Label beside the value

Plan
Team, billed yearly
Seats
12 of 15 used
Renews
1 March 2027
Payment
Visa ending 4242
<script setup lang="ts">import { DescriptionList } from '@vitral/vue'; const items = [    { label: 'Plan', value: 'Team, billed yearly' },    { label: 'Seats', value: '12 of 15 used' },    { label: 'Renews', value: '1 March 2027' },    { label: 'Payment', value: 'Visa ending 4242' }];</script> <template>    <DescriptionList :items="items" layout="horizontal" label-width="7rem" striped style="width: min(100%, 32rem)" /></template>

API

Read from packages/vue/src/components/DescriptionList/types.ts, so it says what the component actually accepts.

Props

NameTypeDescription
items DescriptionListItem[]—
title string—
columns numberSide by side on a wide list; they fold into one when the list is narrow. Defaults to 1.
layout 'vertical' | 'horizontal'Label above its value (the default), or beside it.
bordered booleanEvery item in a cell of one bordered block.
striped boolean—
size Size—
emptyValue stringShown for an item with no value. Defaults to an em dash.
labelWidth stringThe width of the labels in the horizontal layout.
headingLevel 1 | 2 | 3 | 4 | 5 | 6Make the title a heading of this level.

Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.

Slots

NameSlot propsDescription
title ——
extra —Beside the title: an edit button.
label (context: { item: DescriptionListItem; index: number })—
value (context: { item: DescriptionListItem; index: number })—