Skip to main content
Copy for LLM

List

A styled list component with consistent spacing and design tokens. Supports unordered, ordered, and unstyled lists.

Unordered List

Default unordered list
  • Free shipping from €50
  • Returns within thirty days
  • Support by email and phone

Ordered List

Ordered list
  1. Install the package
  2. Run the installer
  3. Add the Blade directive

No Markers

type="none" removes the markers and adds role="list". WebKit treats a list without markers as plain text, so without the role VoiceOver on iPhone and iPad would announce neither the list nor the number of its items. A role on the tag replaces it.

Unstyled list
  • Account
  • Billing
  • Notifications

Long Lists From Data

Every list.item, link and text is a component of its own, and a component costs a render: a list of a thousand rows, each with a link and a note, renders three thousand of them. Pass the rows as data with items and the list draws them all in its own render. A row is its text, or an array with the text, the href it links to and a short meta note after it, set small and muted:

A list drawn from data
// In the component that renders the page: the rows as data, built once
$rows = $articles->map(fn (Article $article): array => [
    'text' => $article->title,
    'href' => route('articles.show', $article),
    'meta' => $article->updated_at->diffForHumans(),
])->all();

The link and the note carry the classes link and text render with, your personalization of those two included, with one difference: on a filled surface, such as a section on the accent, the two components take the surface's text color, and rows from items keep the page's colors, since every row repeats them. On a filled surface, write the rows as list.item with a link and a text. An href the browser would run as script, javascript: and the like, leaves its row as text. Rows from items come first, and anything in the slot follows them. For a row that needs more than a text, a link and a note, write a list.item for it.

Spacing

Medium spacing
  • Each item of this list wraps onto a second line at a narrow width, and the extra space between the items keeps one item apart from the next
  • Use it for items of a sentence or more
  • Keep the default for short items

Roman & Alpha Markers

For multi-level legal / academic / spec-style numbering, four additional type values are available — lower-roman (i, ii, iii), upper-roman (I, II, III), lower-alpha (a, b, c), upper-alpha (A, B, C). All four render as <ol> (ordered list semantics).

Lower Roman
  1. Preamble
  2. Recitals
  3. Operative provisions
Upper Alpha
  1. Personal data
  2. Account credentials
  3. Usage telemetry

Nested Lists

Lists nest by composition — drop another <x-wirekit::list> inside a <x-wirekit::list.item>. Mix type values per level for legal / spec / outline-style hierarchies. The example below nests five levels, numbered 1 → A → i → a → • as legal contracts and standards documents number them, and its third section numbers its points in upper Roman:

Five-level nested list with mixed markers
  1. Top-level numbered section
    1. Capital-letter sub-section
      1. Lower-roman clause
        1. Lower-letter sub-clause
          • Bullet detail one
          • Bullet detail two
        2. Another lower-letter sub-clause
      2. Second lower-roman clause
    2. Second capital-letter sub-section
  2. Second top-level section (no nesting)
  3. Third top-level section
    1. Major roman point
    2. Another major roman point

Each level is a fresh <x-wirekit::list type="…"> — markers, spacing, and the underlying tag (<ol> / <ul>) all resolve from the inner component's own type prop. Markdown's flat list-syntax can't express this; pure <x-wirekit::list> composition can.

Props — List

Prop Type Default Description
type string 'disc' Marker type: disc, decimal, none, lower-roman, upper-roman, lower-alpha, upper-alpha
spacing string 'sm' Item spacing: none, sm, md
as string|null null Override element (auto: ul for disc / none, ol for ordered types)
items array|Collection|null null Rows as data, drawn in one render: a string, or an array with text, href and meta. See Long Lists From Data
scope string|null null Scoped personalization name

Props — List Item

Prop Type Default Description
scope string|null null Scoped personalization name

Keyboard Interaction

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

Pitfalls

  • Don't use a list for layout. Reach for <x-wirekit::stack> or <x-wirekit::row>. Lists carry semantic role="list" and screen readers announce item count — misleading for non-list content.

Design Tokens

Token Used for
--font-wk-sans Font family of the list
--color-wk-text Text color of the items and their markers
--text-wk-md Font size of the list
--font-wk-letter-spacing Letter spacing of the list
--space-wk-lg The indent that holds the markers, at the start of the line in either reading direction. A list with type="none" has none

The space between items is fixed per spacing step: 0.25rem for sm, 0.5rem for md. The rows of items draw their link and their note with the tokens of the link component and the text component.

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