Display

Segmented Steps Bar

Pipeline progress by stage: the track is cut into segments with gaps, so you read "three of five stages done, the fourth is running" instead of "roughly sixty percent".

  • progress
  • steps
  • pipeline
  • display

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/progress-002?lang=en

Release pipeline2 / 5
  1. Очередь
  2. Сборка
  3. Тесты
  4. Ревью
  5. Выкладка
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 "progress-002" (Segmented Steps Bar) 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/progress-002.json

Registry item: https://vibeui.ru/r/progress-002.json
Installs to: components/vibeui/progress-002.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
Pipeline progress by stage: the track is cut into segments with gaps, so you read "three of five stages done, the fourth is running" instead of "roughly sixty percent".

Stage progress: a segmented track, captions under the segments and an aria-valuetext that names the current stage in words. Zero dependencies, one file, server rendered.

## 3. How to use it
import { Progress002 } from "@/components/vibeui/progress-002"

<Progress002
  label="Release pipeline"
  steps={["Queued", "Build", "Tests", "Review", "Deploy"]}
  current={2}
/>

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-progress-002-* palette — do not swap it for your theme tokens
- the gaps between segments: without them the track reads as one solid ratio again
- the aria-valuemin/valuemax scale in stages, not percent — otherwise speech drifts from the picture
- the aria-valuetext naming the current stage: "three of five" alone does not say what is happening
- the equal flex shares on segments and captions: different shares pull the columns apart
- the card's own light surface: without it the dark text disappears on a dark background

## 6. You may change
- the stage list through steps and their count
- the current stage through current
- the heading through label
- the fill colour through accent

## 7. Rules
- current is a zero-based index: a value equal to steps.length is clamped to the last stage.
- Long captions are ellipsized — plan for about twelve characters each.
- More than seven stages turn the segments into indistinguishable slivers; group them instead.
- 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/progress-002.json
https://vibeui.ru/r/progress-002.json

Компонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-progress-002-*. Серверный: хуков нет, состояние приходит пропсами. Дорожка — flex из равных сегментов с зазором 0.25rem: граница этапа задана разрывом, а не другим цветом, поэтому она видна и в монохроме. Текущий сегмент залит анимированным двухцветным градиентом через background-position — движение не трогает раскладку. Подписи этапов лежат вторым flex-рядом с теми же долями, поэтому колонки подписей совпадают с сегментами. role="progressbar" объявлен на дорожке со шкалой в этапах, а не в процентах, и aria-valuetext называет текущий этап словами.

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 Progress002Props = Omit<
  ComponentPropsWithoutRef<"div">,
  "children"
> & {
  steps?: string[]
  /** Индекс текущего этапа: всё до него считается пройденным. */
  current?: number
  label?: string
  accent?: string
}

// Идея компонента: прогресс конвейера показан не долей, а этапами. Дорожка
// разрезана на отдельные сегменты с зазорами, поэтому видно не «примерно
// шестьдесят процентов», а «три этапа из пяти закрыты, идёт четвёртый».
const STYLES = `
:where([data-vibeui-block="progress-002"]){
--vibeui-progress-002-bg:oklch(1 0 0);
--vibeui-progress-002-fg:oklch(0.26 0.016 265);
--vibeui-progress-002-muted:oklch(0.56 0.014 265);
--vibeui-progress-002-border:oklch(0.9 0.006 265);
--vibeui-progress-002-track:oklch(0.93 0.005 265);
--vibeui-progress-002-accent:oklch(0.55 0.19 262);
--vibeui-progress-002-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="progress-002"]{
display:flex;flex-direction:column;gap:0.75rem;
width:100%;max-width:30rem;box-sizing:border-box;padding:1rem;
background:var(--vibeui-progress-002-bg);
border:1px solid var(--vibeui-progress-002-border);border-radius:0.875rem;
font-family:var(--vibeui-progress-002-font);color:var(--vibeui-progress-002-fg);
}
[data-vibeui-block="progress-002"] [data-part="head"]{
display:flex;align-items:baseline;justify-content:space-between;gap:0.75rem;
font-size:0.8125rem;font-weight:650;
}
[data-vibeui-block="progress-002"] [data-part="count"]{
font-weight:500;color:var(--vibeui-progress-002-muted);font-variant-numeric:tabular-nums;
}
/* Сегменты вместо сплошной полосы: зазор делает границу этапа видимой. */
[data-vibeui-block="progress-002"] [data-part="track"]{
display:flex;gap:0.25rem;
}
[data-vibeui-block="progress-002"] [data-part="segment"]{
flex:1 1 0;height:0.375rem;border-radius:9999px;
background:var(--vibeui-progress-002-track);
}
[data-vibeui-block="progress-002"] [data-part="segment"][data-state="done"]{
background:var(--vibeui-progress-002-accent);
}
[data-vibeui-block="progress-002"] [data-part="segment"][data-state="current"]{
background:linear-gradient(90deg,var(--vibeui-progress-002-accent) 50%,var(--vibeui-progress-002-track) 50%) 0 0 / 200% 100%;
animation:vibeui-progress-002-fill 1.6s ease-in-out infinite;
}
@keyframes vibeui-progress-002-fill{
0%{background-position:100% 0}
100%{background-position:0 0}
}
[data-vibeui-block="progress-002"] ol{
display:flex;gap:0.25rem;margin:0;padding:0;list-style:none;
font-size:0.6875rem;color:var(--vibeui-progress-002-muted);
}
[data-vibeui-block="progress-002"] li{
flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
[data-vibeui-block="progress-002"] li[data-state="current"]{
color:var(--vibeui-progress-002-fg);font-weight:650;
}
@media (prefers-reduced-motion:reduce){
[data-vibeui-block="progress-002"] *{animation:none!important;transition:none!important}
[data-vibeui-block="progress-002"] [data-part="segment"][data-state="current"]{background:var(--vibeui-progress-002-accent);opacity:.55}
}
`

const DEFAULT_STEPS = ["Очередь", "Сборка", "Тесты", "Ревью", "Выкладка"]

/**
 * Прогресс конвейера по этапам: дорожка разрезана на сегменты.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Progress002({
  steps = DEFAULT_STEPS,
  current = 2,
  label = "Пайплайн релиза",
  accent,
  className,
  style,
  ...props
}: Progress002Props) {
  const total = steps.length
  const index = Math.min(Math.max(0, current), total - 1)
  const palette = {
    ...(accent ? { "--vibeui-progress-002-accent": accent } : null),
    ...style,
  } as CSSProperties

  return (
    <>
      <style href="vibeui-progress-002" precedence="medium">
        {STYLES}
      </style>
      <div
        {...props}
        data-vibeui-block="progress-002"
        className={className}
        style={palette}
      >
        <div data-part="head">
          <span>{label}</span>
          <span data-part="count">
            {index} / {total}
          </span>
        </div>
        <div
          data-part="track"
          role="progressbar"
          aria-label={label}
          aria-valuemin={0}
          aria-valuemax={total}
          aria-valuenow={index}
          aria-valuetext={`${steps[index]}: этап ${index + 1} из ${total}`}
        >
          {steps.map((step, position) => (
            <span
              key={step}
              data-part="segment"
              data-state={
                position < index
                  ? "done"
                  : position === index
                    ? "current"
                    : "todo"
              }
            />
          ))}
        </div>
        <ol>
          {steps.map((step, position) => (
            <li key={step} data-state={position === index ? "current" : "todo"}>
              {step}
            </li>
          ))}
        </ol>
      </div>
    </>
  )
}