KANTO DS v1.12.0
Customise

Theme

Accent

Font

Corners

Density

Text size

Reset to Kanto
Data

kt-description-list

GitHub Copy link

Terms and their details — an invoice's number, customer and amount; a person's email and role — the body of a detail page.

Preview

Terms and their details — an invoice's number, customer and amount; a person's email and role — the body of a detail page.

<kt-description-list label="Invoice" bordered></kt-description-list> <script> document.querySelector('kt-description-list').items = [ { term: 'Invoice', detail: 'INV-2041' }, { term: 'Customer', detail: 'Acme Corp' }, { term: 'Amount', detail: '$1,200' }, { term: 'Purchase order', detail: '' }, ]; </script>

Items

items is a list of { term, detail }, drawn as a real <dl>: each term and its detail grouped in a <div>, as the HTML specification allows. An empty detail shows a dash, so a missing value reads as missing rather than as a gap someone forgot to fill.

Layout

layoutWhat it is
horizontalThe default: each term beside its detail, in a column --kt-description-term-width wide.
stackedEach term over its detail; columns (1–4) sets them side by side.

Both follow the list's own width: below 480px a horizontal list stacks and a stacked one drops to a single column, in a narrow panel as on a phone. bordered draws a rule under each item.

Accessibility

A description list is announced as such, with the number of its items; name it with label when the page has more than one. Terms are muted and details full strength, so the eye reads the values while a screen reader reads both.

API

PropertyAttributeTypeDefault
items—KtDescriptionItem[][]
layoutlayout'horizontal' | 'stacked''horizontal'
columnscolumnsnumber (1–4)1
borderedborderedbooleanfalse
labellabelstring''
PartDescription
listThe <dl>
itemOne term and its detail
termThe <dt>
detailThe <dd>