Description List

Material Design 3-styled description list web components (lit-material-description-list, lit-material-description-list-group) — term/description pairs.

  • 1.4 KB gzipped
  • @lit-material/description-list 0.1.0
  • Renders on the server

Example

Install

npm install @lit-material/description-list @lit-material/tokens
import "@lit-material/description-list";

Link @lit-material/tokens/css/index.css once per page for the colour, type and shape tokens. Install guide

API

<lit-material-description-list-group>

One term/description pair within lit-material-description-list. Sets role="listitem" on itself (see that component for why this uses ARIA roles instead of native <dl>/<dt>/<dd>), and renders term/ definition roles internally for the pair itself.

Slots

SlotDescription
termThe term (a label, a field name).
defaultThe description.

CSS parts

PartDescription
termThe term's container.
descriptionThe description's container.

<lit-material-description-list>

Groups lit-material-description-list-group elements — metadata display (a set of term/description pairs), distinct from lit-material-list's interactive, single-column item list and lit-material-data-table's columnar tabular data.

Properties

PropertyAttributeTypeDefaultDescription
horizontalhorizontalbooleanfalse

Slots

SlotDescription
defaultlit-material-description-list-group elements.

CSS parts

PartDescription
listThe container.

Source on GitHub npm