UI components · Composed · new in 0.7
SpTimelineList
A vertical list of events: done (hatched), current (heightened), pending and error. Group: Composed · new in silverpoint 0.7, in React, Vue, Angular and Reflex (sp_timeline_list).
Live
Drawn here with the Reflex version, sp_timeline_list, on the ground you pick:
Code
The same example in each framework; pick one once and every example on the site follows it.
import { SpTimelineList } from '@silverpoint/react/ui/timeline-list';
const steps = [
{ title: 'Drawn', time: '09:12', description: 'The ground is prepared.', status: 'done' },
{ title: 'Reviewed', time: '11:05', description: 'Precision mode checked.', status: 'current' },
{ title: 'Published', time: '—', description: 'Waiting for the release.', status: 'pending' },
] as const;
<SpTimelineList items={steps} label="Release steps" /><script setup lang="ts">
import { SpTimelineList } from '@silverpoint/vue/ui/timeline-list';
const steps = [
{ title: 'Drawn', time: '09:12', description: 'The ground is prepared.', status: 'done' },
{ title: 'Reviewed', time: '11:05', description: 'Precision mode checked.', status: 'current' },
{ title: 'Published', time: '—', description: 'Waiting for the release.', status: 'pending' },
] as const;
</script>
<template>
<SpTimelineList :items="steps" label="Release steps" />
</template>import { Component } from '@angular/core';
import { SpTimelineList } from '@silverpoint/angular/ui/timeline-list';
@Component({
selector: 'app-steps',
imports: [SpTimelineList],
template: `<sp-timeline-list [items]="steps" label="Release steps" />`,
})
export class Steps {
protected readonly steps = [
{ title: 'Drawn', time: '09:12', description: 'The ground is prepared.', status: 'done' },
{ title: 'Reviewed', time: '11:05', description: 'Precision mode checked.', status: 'current' },
{ title: 'Published', time: '—', description: 'Waiting for the release.', status: 'pending' },
] as const;
}sp_timeline_list(
[
{"title": "Drawn", "time": "09:12", "description": "The ground is prepared.", "status": "done"},
{"title": "Reviewed", "time": "11:05", "description": "Precision mode checked.", "status": "current"},
{"title": "Published", "time": "—", "description": "Waiting for the release.", "status": "pending"},
],
label="Release steps",
)Import
Import @silverpoint/grounds/ui.css once, beside styles.css; Reflex adds it for you. Every adapter also exports it from the ui barrel.
| Framework | Import |
|---|---|
| React | import { SpTimelineList } from '@silverpoint/react/ui/timeline-list'; |
| Vue | import { SpTimelineList } from '@silverpoint/vue/ui/timeline-list'; |
| Angular | import { SpTimelineList } from '@silverpoint/angular/ui/timeline-list'; · sp-timeline-list |
| Reflex | from reflex_silverpoint_react import sp_timeline_list |
Props
| React / Angular | Vue | Type | Description |
|---|---|---|---|
items required | items | readonly TimelineListItem[] | The events, in reading order. |
label | label | string | Accessible name of the list. |
In Reflex the names are snake_case; the Reflex column of Composed components shows the builder's arguments.
Common props
Every UI component also takes these, falling back to the dashboard it sits in, then to the provider. In Reflex they read silverpoint_provider too; only sp_trigger does not: pass them to it.
| React / Angular | Vue | Reflex | Type | Description |
|---|---|---|---|---|
id | id | id | str | The frame variant and every related id derive from it. |
ground | ground | ground | Literal['silverpoint', 'cyanotype'] | str | dict[str, Any] | Style ground: "silverpoint" or "cyanotype", or a ground object. Defaults to the dashboard's, then the provider's, or silverpoint. |
substrate | substrate | substrate | Literal['cream', 'green', 'blue', 'ochre', 'prussian'] | Prepared substrate within the ground. |
mode | mode | mode | Literal['ink', 'precision'] | ink by default; precision disables inking. |
seed | seed | seed | str | int | Seed of the frame's hand; overrides id for the frame variant only. |
size | size | size | Literal['sm', 'md', 'lg'] | Control size: sm, md (default) or lg. |
palette | palette | palette | dict[str, str] | Colours over the ground's (set with palette=), merged over the dashboard's and the provider's. |
className | class-name | class_name | str | Added to the component's root element, after its own classes. |
palette | palette | palette | Palette | Colours over the ground's, merged over the dashboard's and the provider's. |
Report it
Found something wrong with SpTimelineList? Open an issue on GitHub — the form comes pre-filled with the component and the version.