Display

Project Milestones

A project timeline where milestones are not equal to ordinary entries: a milestone gets a diamond and a bold date, and on a wide block the dates move into their own column.

  • timeline
  • milestones
  • project
  • dates

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.

put this in the header: https://vibeui.ru/c/timeline-004?lang=en

Project timeline

  1. 14 января
    Старт проекта

    Собрана команда, согласован объём первой версии

  2. 02 февраля
    Прототип интерфейса
  3. 27 февраля
    Внутренний релиз

    Сборка для команды: только каталог и поиск

  4. 11 марта
    Правки после теста на пользователях
  5. 05 апреля
    Публичный запуск

    Открытая регистрация и первый платный тариф

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-004" (Project Milestones) 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-004.json

Registry item: https://vibeui.ru/r/timeline-004.json
Installs to: components/vibeui/timeline-004.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
A project timeline where milestones are not equal to ordinary entries: a milestone gets a diamond and a bold date, and on a wide block the dates move into their own column.

A dated timeline: milestones are marked with a diamond, and on a wide block the date takes its own column. Zero dependencies, one file, no client JS.

## 3. How to use it
import { Timeline004 } from "@/components/vibeui/timeline-004"

<Timeline004
  title="Project timeline"
  points={[
    { date: "January 14", title: "Kick-off", text: "Scope of the first release agreed", milestone: true },
    { date: "February 2", title: "Interface prototype" },
  ]}
/>

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-004-* palette — do not swap it for your theme tokens
- the diamond on a milestone: what matters must differ in shape, not only in colour
- the layout driven by the block's own width — window width would make the catalogue tile lie
- the @container rules on the inner shell: a container query never applies to the container itself
- the right-aligned dates in the wide layout: that is what makes them read as a column
- the block's own light surface: dark text disappears on a dark page

## 6. You may change
- the heading through title
- the entries through points: date, title, note and the milestone flag
- the accent colour through accent
- the breakpoint of the wide layout in the @container rule

## 7. Rules
- Dates are strings: sorting and formatting them is the application's job.
- If everything is a milestone the distinction disappears — keep them under a third.
- In the wide layout the date column has a fixed width: a long date will wrap.
- 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-004.json
https://vibeui.ru/r/timeline-004.json

Компонент самодостаточен: один файл, без зависимостей, палитра в локальных переменных --vibeui-timeline-004-*. Серверный: хуков нет. Раскладка считается от собственной ширины блока через container-type:inline-size, а правила @container лежат на внутреннем [data-part="shell"] и потомках — контейнерный запрос не действует на сам контейнер. Узкий блок даёт один столбец с датой над заголовком, широкий — grid из трёх колонок, где даты выстраиваются по правому краю и список читается как календарь. Веха отличается формой метки (повёрнутый на 45° квадрат), а не только цветом.

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 Timeline004Point = {
  date: string
  title: string
  text?: string
  /** Веха рисуется ромбом и не теряется среди рядовых записей. */
  milestone?: boolean
}

export type Timeline004Props = Omit<
  ComponentPropsWithoutRef<"section">,
  "children"
> & {
  points?: Timeline004Point[]
  title?: string
  accent?: string
}

// Идея компонента: хронология проекта, где вехи не равны рядовым записям.
// Веха — ромб и жирная дата, обычная запись — точка: важное видно, даже если
// список не читать. Раскладка считается от собственной ширины блока: узкий
// блок даёт один столбец, широкий — дату отдельной колонкой слева, поэтому
// даты выстраиваются по вертикали и список читается как календарь.
const STYLES = `
:where([data-vibeui-block="timeline-004"]){
--vibeui-timeline-004-bg:oklch(1 0 0);
--vibeui-timeline-004-fg:oklch(0.22 0.014 265);
--vibeui-timeline-004-muted:oklch(0.57 0.014 265);
--vibeui-timeline-004-border:oklch(0.91 0.006 265);
--vibeui-timeline-004-accent:oklch(0.55 0.19 30);
--vibeui-timeline-004-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
container-type:inline-size;
}
[data-vibeui-block="timeline-004"]{
display:block;width:100%;max-width:34rem;box-sizing:border-box;
font-family:var(--vibeui-timeline-004-font);color:var(--vibeui-timeline-004-fg);
}
[data-vibeui-block="timeline-004"] [data-part="shell"]{
display:flex;flex-direction:column;gap:0.75rem;
box-sizing:border-box;padding:0.9375rem;
background:var(--vibeui-timeline-004-bg);
border:1px solid var(--vibeui-timeline-004-border);border-radius:0.875rem;
}
[data-vibeui-block="timeline-004"] [data-part="title"]{margin:0;font-size:0.9375rem;font-weight:650}
[data-vibeui-block="timeline-004"] ol{margin:0;padding:0;list-style:none;display:flex;flex-direction:column}
[data-vibeui-block="timeline-004"] li{
position:relative;display:grid;grid-template-columns:0.875rem 1fr;
gap:0.25rem 0.75rem;padding:0 0 1rem 0;
}
[data-vibeui-block="timeline-004"] li::before{
content:"";position:absolute;left:0.375rem;top:1.125rem;bottom:0;
width:1px;background:var(--vibeui-timeline-004-border);
}
[data-vibeui-block="timeline-004"] li:last-child{padding-bottom:0}
[data-vibeui-block="timeline-004"] li:last-child::before{display:none}
[data-vibeui-block="timeline-004"] [data-part="mark"]{
grid-row:1 / span 2;align-self:start;justify-self:center;margin-top:0.375rem;
width:0.4375rem;height:0.4375rem;border-radius:9999px;
background:var(--vibeui-timeline-004-border);
}
/* Ромб вместо точки: веха отличается формой, а не только цветом. */
[data-vibeui-block="timeline-004"] li[data-kind="milestone"] [data-part="mark"]{
width:0.625rem;height:0.625rem;margin-top:0.25rem;border-radius:0.0625rem;
transform:rotate(45deg);background:var(--vibeui-timeline-004-accent);
}
[data-vibeui-block="timeline-004"] [data-part="date"]{
font-size:0.6875rem;letter-spacing:0.02em;color:var(--vibeui-timeline-004-muted);
font-variant-numeric:tabular-nums;
}
[data-vibeui-block="timeline-004"] li[data-kind="milestone"] [data-part="date"]{
color:var(--vibeui-timeline-004-accent);font-weight:700;
}
[data-vibeui-block="timeline-004"] [data-part="body"]{display:flex;flex-direction:column;gap:0.125rem;min-width:0}
[data-vibeui-block="timeline-004"] [data-part="name"]{font-size:0.875rem;font-weight:600;line-height:1.3}
[data-vibeui-block="timeline-004"] li[data-kind="milestone"] [data-part="name"]{font-weight:700}
[data-vibeui-block="timeline-004"] [data-part="text"]{margin:0;font-size:0.8125rem;line-height:1.45;color:var(--vibeui-timeline-004-muted)}
/* Широкий блок: дата уезжает в свой столбец и даты встают по вертикали. */
@container (min-width: 30rem){
[data-vibeui-block="timeline-004"] li{grid-template-columns:6.5rem 0.875rem 1fr;align-items:start}
[data-vibeui-block="timeline-004"] li::before{left:7.375rem}
[data-vibeui-block="timeline-004"] [data-part="date"]{grid-column:1;grid-row:1;text-align:right;padding-top:0.1875rem}
[data-vibeui-block="timeline-004"] [data-part="mark"]{grid-column:2;grid-row:1;margin-top:0.4375rem}
[data-vibeui-block="timeline-004"] li[data-kind="milestone"] [data-part="mark"]{margin-top:0.3125rem}
[data-vibeui-block="timeline-004"] [data-part="body"]{grid-column:3;grid-row:1}
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="timeline-004"] *{animation:none!important;transition:none!important}}
`

const DEFAULT_POINTS: Timeline004Point[] = [
  {
    date: "14 января",
    title: "Старт проекта",
    text: "Собрана команда, согласован объём первой версии",
    milestone: true,
  },
  { date: "02 февраля", title: "Прототип интерфейса" },
  {
    date: "27 февраля",
    title: "Внутренний релиз",
    text: "Сборка для команды: только каталог и поиск",
    milestone: true,
  },
  { date: "11 марта", title: "Правки после теста на пользователях" },
  {
    date: "05 апреля",
    title: "Публичный запуск",
    text: "Открытая регистрация и первый платный тариф",
    milestone: true,
  },
]

/**
 * Хронология проекта: вехи ромбом, даты отдельным столбцом на широкой раскладке.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Timeline004({
  points = DEFAULT_POINTS,
  title = "Хронология проекта",
  accent,
  className,
  style,
  ...props
}: Timeline004Props) {
  const palette = {
    ...(accent ? { "--vibeui-timeline-004-accent": accent } : null),
    ...style,
  } as CSSProperties

  return (
    <>
      <style href="vibeui-timeline-004" precedence="medium">
        {STYLES}
      </style>
      <section
        {...props}
        data-vibeui-block="timeline-004"
        className={className}
        style={palette}
      >
        <div data-part="shell">
          <h3 data-part="title">{title}</h3>
          <ol>
            {points.map((point) => (
              <li
                key={point.title}
                data-kind={point.milestone ? "milestone" : "event"}
              >
                <span data-part="mark" aria-hidden="true" />
                <span data-part="date">{point.date}</span>
                <div data-part="body">
                  <span data-part="name">{point.title}</span>
                  {point.text ? <p data-part="text">{point.text}</p> : null}
                </div>
              </li>
            ))}
          </ol>
        </div>
      </section>
    </>
  )
}