Data display

List

A bulleted or numbered list, from an array of texts or from <li> elements written in the slot. Use it for short lists in body text, such as requirements or steps.

  • At least 8 characters
  • One number
  • One symbol
Blade

A <ul> with three bulleted items, each in the body text style. The bullets sit inside the text column, aligned with the paragraphs around it.

Numbered #

An <ol> numbered 1, 2, 3.

  1. Create an account
  2. Confirm your email
  3. Invite your team
Blade

Items written by hand #

The slot takes <li> elements with any content; here a link per file, with no marker and some space between items.

Sizes #

size sets the size of the item texts.

  • Size sm
  • Second item
  • Size md
  • Second item
  • Size lg
  • Second item
Blade

Livewire data #

items re-renders with the component state.

  1. Create an account
  2. Confirm your email
Blade

Customization #

item: attributes go to the text of each item (a tk:text), and li: to each <li>.

  • Unlimited projects
  • Priority support
  • Custom domain
Blade

Reference

tk:list

Prop Type Default Description
items array | Collection null The item texts, each translated.
marker string disc disc for bullets, decimal for numbers (an <ol>), none for no marker.
size string md xs, sm, md, lg, xl, 2xl or 3xl. Sets the size of the item texts.

Slots

Slot Description
default <li> elements, rendered before the items.

Prefixes

Prefix Goes to
li: Each <li>.
item: The text inside each item, a tk:text (item:variant="subtle", item:icon="mdi:check"...).

Customization

Classes and attributes go to the <ul> or <ol>. To reach the items from items, prefix the attribute (listed in the Reference above).

blade

Accessibility

A native list, so screen readers announce the number of items. With marker="none" it also has role="list", because Safari stops announcing lists whose markers are removed by CSS.

Behavior notes

  • With no items and no slot content, nothing is rendered.
  • Each item from items is translated, like the labels of the other components.
  • Without item:icon, the text of each item from items is inline: the marker stays on its first line and a long text wraps under the marker. With item:icon, the icon and the text form one inline-flex box, so a text too long to fit beside the marker moves to the line below it.