Components
Timeline
A line of moments: Root is the ordered thread, Item one moment on it, Marker the point where the thread passes, Content what the moment holds. The hairline between markers is drawn by the stylesheet.
#Basic usage
- Sketch — the first brush line settles on the paper.
- Ink — the strokes deepen and the hierarchy appears.
- Seal — the red stamp closes the finished work.
<script setup lang="ts">
import { Timeline } from "@bysages/vue";
</script>
<template>
<Timeline.Root>
<Timeline.Item>
<Timeline.Marker />
<Timeline.Content>
<strong>Sketch</strong> — the first brush line settles on the paper.
</Timeline.Content>
</Timeline.Item>
<Timeline.Item>
<Timeline.Marker />
<Timeline.Content>
<strong>Ink</strong> — the strokes deepen and the hierarchy appears.
</Timeline.Content>
</Timeline.Item>
<Timeline.Item>
<Timeline.Marker />
<Timeline.Content>
<strong>Seal</strong> — the red stamp closes the finished work.
</Timeline.Content>
</Timeline.Item>
</Timeline.Root>
</template>
- GroundThe stone is squared
- InkThe pigment meets the water
- StrokeThe hand commits
- SealThe name closes the work
<script setup lang="ts">
import { Timeline } from "@bysages/vue";
const moments = [
{ title: "Ground", note: "The stone is squared" },
{ title: "Ink", note: "The pigment meets the water" },
{ title: "Stroke", note: "The hand commits" },
{ title: "Seal", note: "The name closes the work" },
];
</script>
<template>
<Timeline.Root orientation="horizontal" class="w-full">
<Timeline.Item v-for="m in moments" :key="m.title">
<Timeline.Marker />
<Timeline.Content>
<div class="text-sm font-medium">{{ m.title }}</div>
<div class="mt-1 text-xs text-tertiary">{{ m.note }}</div>
</Timeline.Content>
</Timeline.Item>
</Timeline.Root>
</template>
#Props
#TimelineRoot
The thread's direction: a vertical line of moments, or one running left to right.
| Prop | Type | Default | Description |
|---|---|---|---|
orientation | String as PropType<"vertical" | "horizontal"> | "vertical" | — |
#TimelineItem
A styled part — no props of its own; it takes the anatomy's shared styling.
#TimelineMarker
A styled part — no props of its own; it takes the anatomy's shared styling.
#TimelineContent
A styled part — no props of its own; it takes the anatomy's shared styling.