Skip to main content
WireKit
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
  • First item
  • Second item
  • Third item

Ordered List

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

No Markers

Unstyled list
  • Clean item one
  • Clean item two
  • Clean item three

Spacing

Medium spacing
  • Item with more space
  • Between each item
  • For better readability

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 — Worst-Case (mixed marker types, 5 levels)

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 combines all five marker styles across five depth levels, replicating the "1 → a → i → ●" pattern common in legal contracts and standards documents:

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)
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

The list and list-item primitives are layout wrappers — they apply structural classes (spacing utilities, semantic <ul> / <ol> / <li> elements) without referencing color or sizing tokens directly. Item content (icons, badges, links) inherits its tokens from the surrounding Text, Icon component, and Link component.

Was this page helpful?

Voting requires cookies or local storage. What we store