Skip to main content
Copy for LLM

Data List

Semantic key-value pairs rendered as a native <dl> (definition list). Ideal for displaying record details, settings summaries, or any structured label + value content.

Basic Usage

Horizontal data list (default)
Name
Dana Ortiz
Email
dana.ortiz@example.com
Plan
Pro ($29/mo)
Joined
June 1, 2024

The value can also be passed as value, which reads naturally when it comes straight from a model. It is rendered as text. When an item has both, the slot wins, so use the slot for anything with markup, such as a badge or a link.

Values passed as the value prop
Order
SO-10482
Carrier
Standard shipping
Delivered
March 14, 2025

Layouts

Horizontal (default)

Labels on the left, values on the right. Items separated by dividers:

<x-wirekit::data-list layout="horizontal">
    <x-wirekit::data-list.item label="Status">Active</x-wirekit::data-list.item>
</x-wirekit::data-list>

Stacked

Labels above values, each item spaced vertically:

Stacked layout
Description
A long description that wraps naturally in a stacked layout without being constrained by a side-by-side arrangement.
Category
Engineering

Grid

Two columns, and one on a screen narrower than 40rem:

Grid layout
First Name
Dana
Last Name
Ortiz
Email
dana.ortiz@example.com
Phone
+1 (555) 123-4567

Summary

The totals shape — an invoice subtotal block, a cart summary, an order overview. The label takes whatever width is left over; the value is as wide as its own content and sits flush right, so amounts line up under one another along a single column edge. Values are set in tabular figures, so digits occupy equal widths and the decimal points stack:

Summary layout
Subtotal
$1,240.00
Shipping
$12.50
Tax (19%)
$238.08
Total
$1,490.58

Use it wherever a value is a quantity rather than a description. grid cannot express this shape — its two tracks are equal, so the amount is handed half the row and floats in the middle of its own whitespace — and horizontal cannot either, because its label track is a fixed third of the width, so a long label wraps while the center of the row sits empty.

Two deliberate differences from the other three layouts:

  • No row separators, and no per-item padding. Row rhythm comes from the grid's row gap instead. A totals block rules the line above the grand total, not every line, and emphasis="total" on that row draws it, see Emphasis.
  • A class on an item has no visual effect. The item's wrapper is display: contents here, so that its <dt> and <dd> can be the grid's own items. Set a row apart with emphasis, or style the value through the slot content.

Detail

The mirror of summary, and the commoner of the two: the label is as wide as its own text and the value takes the rest. This is the ordinary detail list — a customer, a payment method, a shipping option — where the value is a description rather than a quantity:

Detail layout
Customer
Dana Ortiz
Payment method
Credit card ending 4242
Shipping
Standard, 3–5 business days

grid is the tempting wrong choice here. Its two tracks are equal, so a short label like "Shipping" is handed half the row and the value the other half, leaving the two standing apart with the middle of the row empty.

It shares summary's grid mechanics — the items become the list's own grid cells, so the value column is one track measured across every row — and deliberately not its alignment. A summary value is an amount and sits flush right in tabular figures so the digits stack; a detail value is prose, and right-aligning a sentence strands it against the far edge.

The column sized to its content has a limit in both layouts, the label's in detail and the value's in summary: it is as wide as its content up to 10rem, or up to 40% of the row where that is wider. A longer label or value, such as a file name or a code with no space in it, breaks inside that column, and the other column keeps the rest of the row. For a list of file names stacked reads better still, since each name gets the whole width above its value.

Inline

The compact form, for a few entries in a narrow place such as a table cell under an article's name: one line per entry, "Label: value", in the small text size, without padding or rules between the entries. The value keeps the line breaks it was typed with, an engraving of two lines stays two lines, and a long token breaks where the line ends. A value that carries markup, such as a badge, lays out as it does in every other layout.

What a customer entered, under a line of an order
Engraving:
Happy birthday, Mira
Gift wrap:
Blue paper

Emphasis

emphasis sets a row apart from the rows around it, for the rows of a totals block. It styles the label and the value together:

  • strong sets both in the size of the value and the weight of a heading, and the label in the color of the text. Use it for an amount a reader looks for, such as what is still to pay.
  • total does the same and draws a rule above the row, for a sum of the rows above it.
  • sub sets both one size smaller and muted, for a breakdown of the row above, such as the tax a gross amount contains.
An order total with its tax and what is still to pay
Items
$1,428.00
Shipping
$11.90
Total
$1,439.90
of which tax (19%)
$229.90
Paid
$1,000.00
Outstanding
$439.90

The rule of total spans both columns in summary and detail, and stands above the entry in inline. horizontal, stacked and grid already draw a rule below every row but the last, so there total sets the label and the value in weight and adds no second rule.

Rich Values

The value slot accepts any content, including other WireKit components:

Rich values
Status
Active
Plan
Pro
Next billing
December 1, 2024

Props

Container

Prop Type Default Description
layout string 'horizontal' horizontal | stacked | grid | summary | detail | inline
scope string null Scoped personalization key

Item

Prop Type Default Description
label string null The label (key) for this entry
value string null The value for this entry, rendered as text when the slot is empty. The slot wins when both are given
emphasis string null strong | total | sub. Sets a row of a totals block apart, label and value together, see Emphasis
scope string null Scoped personalization key

Accessibility

  • Uses native <dl>, <dt>, <dd> HTML elements — screen readers announce content as a definition list.
  • No ARIA attributes needed — the semantic HTML provides the accessibility contract.
  • Label text styled with muted color but readable at WCAG AA contrast ratios via design tokens.
  • emphasis changes how a row looks, not what a screen reader announces. Let the label carry the meaning, "Total" or "of which tax", so that a reader who does not see the weight or the rule still knows which row is the sum.

Keyboard Interaction

This component is purely presentational and does not respond to keyboard input.

Pitfalls

  • label as an attribute is escaped; a slot is not. A <strong> passed to the label prop renders as text — {{ $label }} escapes it. The value is the item's default slot, and a slot is Htmlable, so it passes through unescaped: that is what makes the Rich Values example above work. For a rich key, pass the label as a named slot, <x-slot:label><strong>Total</strong></x-slot:label>, and it renders as markup in the <dt>. Markup in the default slot lands in the <dd>, beside an empty key.
  • Don't reach for summary when the value is prose. It sizes the value column to its content, up to its limit, so a sentence wraps flush right in a narrow column beside the label. stacked is the layout for long values.
  • Write each pair as data-list.item, not as a bare <dt> and <dd>. The list is a <dl>, so raw <dt> and <dd> children render, but without the item's layout and look: the label reads like the value, and the layout of the list does not reach them. php artisan wirekit:doctor:props reports such an element with its line and the item to write.

Design Tokens

Token Usage
--font-wk-sans Font family
--text-wk-md Body text size
--text-wk-sm Label text size, and the value size of a sub row
--text-wk-xs Label text size of a sub row
--color-wk-text Value text color, and the label color of a strong or total row
--color-wk-text-muted Label text color, and the value color of a sub row
--color-wk-border-subtle The rule between rows (horizontal, stacked and grid layouts)
--color-wk-border The rule above a total row
--border-wk-width The width of the rule between rows and of the rule above a total row
--padding-wk-y-sm Item vertical padding
--font-wk-heading-weight Label font weight, and the weight of a strong or total row
--gap-wk-xs Row gap (summary and detail layouts)
--space-wk-xs The space above and below the rule of a total row
--gap-wk-md Column gap between label and value (summary and detail layouts)
--gap-wk-lg Gap between rows (stacked, grid) and between label and value (horizontal)

Updated in WireKit v2.74.0 (2026-11-24)

Was this page helpful?

Thank you for your feedback!

Voting requires cookies or local storage. What we store