WlTimeline
Basic example
Pass an ISO date and a readable date label. The application chooses the order and supplies any details needed to understand an event.
- Request received
- Request approved
The team can start preparing the delivery.
Full example
<WlTimeline :items="items" >
<template #marker="{ item }">
<WlIcon :name="item.key === 'approved' ? 'check' : 'file'" :size="16" />
</template>
<template #empty>
<WlEmpty title="No events yet" />
</template>
</WlTimeline>Example data
- Request received
- Request approved
The team can start preparing the delivery.
Full example
<WlTimeline :items="items" >
<template #marker="{ item }">
<WlIcon :name="item.key === 'approved' ? 'check' : 'file'" :size="16" />
</template>
<template #empty>
<WlEmpty title="No events yet" />
</template>
</WlTimeline>Order progress
Use the content slot for a status badge. The timeline keeps responsibility for rendering the date.
- Request received
- Request approved
The team can start preparing the delivery.
- Send the packagePlanned
Full example
<script setup lang="ts">
import { WlPill, WlTimeline } from "legato-ui";
import { computed } from "vue";
const stages = computed(() => [
{ key: "received", title: "Request received", datetime: "2026-11-28", dateLabel: "28 November" },
{ key: "approved", title: "Request approved", datetime: "2026-11-29", dateLabel: "29 November", description: "The team can start preparing the delivery." },
{ key: "delivery", title: "Send the package", datetime: "2026-11-30", dateLabel: "30 November" }
]);
</script>
<template>
<WlTimeline :items="stages">
<template #content="{ item }">
<div class="wl-stack" data-space="xs">
<div class="wl-inline" data-space="sm">
<strong>{{ item.title }}</strong>
<WlPill v-if="item.key === 'delivery'" tone="info" label="Planned" />
</div>
<p v-if="item.description" class="wl-text-small wl-text-muted">{{ item.description }}</p>
</div>
</template>
</WlTimeline>
</template>Props
Types, accepted values and literal defaults come from the public manifest. Inherited settings name their source; “Not set” means no default is declared.
| Prop | Type / values | Default | Purpose |
|---|---|---|---|
items * | readonly WlTimelineItem[] | Required | Events in the display order chosen by the application. |
pt | WlPt< | Not set | Attributes for the list, item, marker, date and content. |
Events
No public events.
Slots
| Slot | Type / values | Content |
|---|---|---|
marker | marker?(props: { item: WlTimelineItem }): unknown; | Customize the decorative event marker. |
content | content?(props: { item: WlTimelineItem }): unknown; | Replace the title and description. |
empty | empty?(): unknown; | Content for an empty timeline. |
Pass-through: pt
Sections WlTimeline are listed below. Attributes merge in this order: createWlPt() WlConfig.ptpt instance. Class and style merge; the last supplied value takes priority for other attributes.
| Section | DOM | Purpose |
|---|---|---|
root | ol.wl-timeline | Main element of the component. |
item | li.wl-timeline__item | One repeated item. |
marker | span.wl-timeline__marker | Decorative event marker. |
content | div.wl-timeline__content | Main content area. |
date | time.wl-timeline__date | Readable event date. |
Sections refer to the component DOM. Dotted names identify a configuration group and its section; composite parts use their own pt groups. Global and local attributes merge, with class and style added together.
Keyboard and accessibility
- Pass an ISO date and a readable date label. The application chooses the order and supplies any details needed to understand an event.
- A timeline marker is decorative and hidden from assistive technology. Put status information in the event title or description.
- Keep dates accompanied by a readable label and place links in the content slot where users can reach them.
Keyboard and application responsibilities
Provide a meaningful accessible name and connect labels, hints and errors to the focusable element. Check the behavior with your own data and a screen reader.
WAI-ARIA Authoring PracticesIn your application, check keyboard controls, zoom and focus visibility. State labels and required information must be readable in every theme.