Display
Event Timeline
An event timeline: the line is the event's own border, so it runs dot to dot and never juts past the last one.
- timeline
- events
- status
- delivery
Preview
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this in the header: https://vibeui.ru/c/timeline-001?lang=en
- 12 марта, 10:20Заказ собран
Курьер забрал посылку со склада
- 13 марта, 08:40В пути
Отправление прибыло в сортировочный центр
- СегодняВ доставке
Курьер привезёт с 10:00 до 14:00
- ЗавтраВручение
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
# Install and place "timeline-001" (Event Timeline) from VibeUI
## 1. Install first — do not skip, do not recreate
Run this exact command before writing any code:
npx shadcn@latest add https://vibeui.ru/r/timeline-001.json
Registry item: https://vibeui.ru/r/timeline-001.json
Installs to: components/vibeui/timeline-001.tsx (the exact path follows this project's components.json aliases).
npm dependencies: none.
Registry dependencies: none.
Install it from the registry. Do not recreate it from the description,
do not substitute a similar component from another library, and do not
rewrite it to match the project's existing style.
## 2. What it is
An event timeline: the line is the event's own border, so it runs dot to dot and never juts past the last one.
An event timeline with time, title and note: a line between dots and distinct shapes for done, current and upcoming. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Timeline001 } from "@/components/vibeui/timeline-001"
<Timeline001 events={[{ time: "Today", title: "In transit", state: "current" }]} />
Read the installed file for the full prop list.
## 4. Where to place it
This is a small inline component. Put it exactly where the user asked,
inside the existing markup. Do not create a new page, section or
wrapper for it. If a similar control already sits in that spot,
replace it instead of adding a second one.
Placement: ___
(The user fills this line in. If it is still blank, ask where to put it
instead of guessing.)
## 5. Keep exactly as installed
- the local --vibeui-timeline-001-* palette — do not swap it for your theme tokens
- the line as the event's border: a separate column always overshoots the last dot
- distinct dot shapes: filled, ringed and hollow — state is not colour alone
- the muted text on upcoming steps
- chronological order top to bottom
- the time on its own line above the title — it gets scanned first
## 6. You may change
- the events array and their states
- the accent through the accent prop
- the completed-step colour
- the block width
## 7. Rules
- The component does not sort: events render in array order.
- There should be one current event: two rings read as broken data.
- For long histories add collapsing — twenty dots in a row do not read.
- Do not lift the CSS variables into globals.css: the component has to stay a single file.
## 8. Verify
- it renders with no console errors;
- it looks like the preview on the VibeUI page you copied this from;
- if it does not, you changed something listed in section 5 — put it back.For developers
npx shadcn@latest add https://vibeui.ru/r/timeline-001.jsonhttps://vibeui.ru/r/timeline-001.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-timeline-001-*. Серверный: хуков нет. Линия — левый бордюр элемента списка, у последнего он прозрачный. Состояние задаётся data-state: пройденное — заливка точки, текущее — кольцо, будущее — пустая точка и приглушённый текст.
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
import type { ComponentPropsWithoutRef, CSSProperties } from "react"
export type Timeline001Event = {
time: string
title: string
text?: string
state?: "done" | "current" | "todo"
}
export type Timeline001Props = Omit<
ComponentPropsWithoutRef<"ol">,
"children"
> & {
events?: Timeline001Event[]
accent?: string
}
// Идея компонента: лента событий с линией слева. Линия нарисована бордюром
// самого элемента списка, а не отдельным столбиком: тогда она тянется ровно
// от точки к точке и не торчит за последним событием. Текущий шаг отличается
// кольцом, а прошедшие — заливкой: состояние читается формой.
const STYLES = `
:where([data-vibeui-block="timeline-001"]){
--vibeui-timeline-001-bg:oklch(1 0 0);
--vibeui-timeline-001-fg:oklch(0.22 0.014 265);
--vibeui-timeline-001-muted:oklch(0.56 0.014 265);
--vibeui-timeline-001-line:oklch(0.9 0.006 265);
--vibeui-timeline-001-accent:oklch(0.55 0.17 265);
--vibeui-timeline-001-done:oklch(0.58 0.15 152);
--vibeui-timeline-001-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="timeline-001"]{
display:flex;flex-direction:column;
width:100%;max-width:22rem;box-sizing:border-box;margin:0;padding:0.875rem;
list-style:none;
background:var(--vibeui-timeline-001-bg);
border:1px solid var(--vibeui-timeline-001-line);border-radius:0.875rem;
font-family:var(--vibeui-timeline-001-font);color:var(--vibeui-timeline-001-fg);
}
/* Линия — бордюр самого события: тянется от точки к точке и не торчит. */
[data-vibeui-block="timeline-001"] li{
position:relative;display:flex;flex-direction:column;gap:0.125rem;
padding:0 0 1rem 1.375rem;
border-left:2px solid var(--vibeui-timeline-001-line);
}
[data-vibeui-block="timeline-001"] li:last-child{border-left-color:transparent;padding-bottom:0}
[data-vibeui-block="timeline-001"] [data-part="dot"]{
position:absolute;left:-0.4375rem;top:0.1875rem;
width:0.75rem;height:0.75rem;box-sizing:border-box;
border-radius:9999px;border:2px solid var(--vibeui-timeline-001-line);
background:var(--vibeui-timeline-001-bg);
}
[data-vibeui-block="timeline-001"] li[data-state="done"] [data-part="dot"]{
border-color:transparent;background:var(--vibeui-timeline-001-done);
}
[data-vibeui-block="timeline-001"] li[data-state="current"] [data-part="dot"]{
border-color:var(--vibeui-timeline-001-accent);
box-shadow:0 0 0 3px color-mix(in oklab,var(--vibeui-timeline-001-accent) 18%,transparent);
}
[data-vibeui-block="timeline-001"] [data-part="time"]{font-size:0.6875rem;color:var(--vibeui-timeline-001-muted);font-variant-numeric:tabular-nums}
[data-vibeui-block="timeline-001"] [data-part="title"]{font-size:0.875rem;font-weight:650;line-height:1.3}
[data-vibeui-block="timeline-001"] li[data-state="todo"] [data-part="title"]{color:var(--vibeui-timeline-001-muted);font-weight:600}
[data-vibeui-block="timeline-001"] [data-part="text"]{margin:0;font-size:0.8125rem;line-height:1.4;color:var(--vibeui-timeline-001-muted)}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="timeline-001"] *{animation:none!important;transition:none!important}}
`
const DEFAULT_EVENTS: Timeline001Event[] = [
{
time: "12 марта, 10:20",
title: "Заказ собран",
text: "Курьер забрал посылку со склада",
state: "done",
},
{
time: "13 марта, 08:40",
title: "В пути",
text: "Отправление прибыло в сортировочный центр",
state: "done",
},
{
time: "Сегодня",
title: "В доставке",
text: "Курьер привезёт с 10:00 до 14:00",
state: "current",
},
{ time: "Завтра", title: "Вручение", state: "todo" },
]
/**
* Лента событий: линия из бордюров, состояние читается формой точки.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Timeline001({
events = DEFAULT_EVENTS,
accent,
className,
style,
...props
}: Timeline001Props) {
const palette = {
...(accent ? { "--vibeui-timeline-001-accent": accent } : null),
...style,
} as CSSProperties
return (
<>
<style href="vibeui-timeline-001" precedence="medium">
{STYLES}
</style>
<ol
{...props}
data-vibeui-block="timeline-001"
className={className}
style={palette}
>
{events.map((event) => (
<li key={event.title} data-state={event.state ?? "todo"}>
<span data-part="dot" aria-hidden="true" />
<span data-part="time">{event.time}</span>
<span data-part="title">{event.title}</span>
{event.text ? <p data-part="text">{event.text}</p> : null}
</li>
))}
</ol>
</>
)
}