Navigation
Chevron Steps
A chevron step ribbon that reads like process breadcrumbs: number and label sit on one line, the arrow is cut with clip-path, and a finished step carries a check mark and a word.
- stepper
- navigation
- progress
- checkout
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/stepper-002?lang=en
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 "stepper-002" (Chevron Steps) 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/stepper-002.json
Registry item: https://vibeui.ru/r/stepper-002.json
Installs to: components/vibeui/stepper-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
A chevron step ribbon that reads like process breadcrumbs: number and label sit on one line, the arrow is cut with clip-path, and a finished step carries a check mark and a word.
A horizontal chevron step ribbon with numbers: the current step is marked with aria-current, finished ones with a check mark and a word. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Stepper002 } from "@/components/vibeui/stepper-002"
<Stepper002
current={2}
label="Checkout"
/>
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-stepper-002-* palette — do not swap it for your theme tokens
- aria-current="step" on the current step: without it every step sounds equal
- the hidden state phrase on each item: a fill colour and a check mark are not read aloud
- the ol ordering: a numbered list is what "step by step" actually means
- container-type:inline-size on the root: the layout must measure the block, not the window
- the component's own light surface: dark text disappears on the dark catalog card
## 6. You may change
- the step names through steps
- the active step number through current
- the ribbon's accessible name through label
- the chevron notch depth through the --vibeui-stepper-002-notch variable
## 7. Rules
- More than five steps do not fit: the chevrons squeeze labels down to an ellipsis.
- current is zero-based — 0 means the first step, not "not started".
- The chevrons are not clickable: returning to a finished step is another variant's job.
- 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/stepper-002.jsonhttps://vibeui.ru/r/stepper-002.jsonКомпонент самодостаточен: один файл, без зависимостей, палитра в переменных --vibeui-stepper-002-*. Серверный: хуков нет. Форма шеврона получается одним clip-path на пункте — вырез слева и остриё справа, — поэтому дополнительных узлов и псевдоэлементов под стрелку не нужно, а соседний пункт наезжает отрицательным margin. Текущий шаг помечен aria-current="step"; состояние каждого пункта дублируется визуально скрытой фразой, потому что цвет заливки сам по себе ничего не сообщает. Ширину меряет контейнерный запрос: ниже 32rem подписи неактивных шагов прячутся, остаются номера и галочки.
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 Stepper002Props = Omit<
ComponentPropsWithoutRef<"nav">,
"children"
> & {
steps?: string[]
/** Номер текущего шага, считая с нуля. */
current?: number
label?: string
accent?: string
}
// Идея компонента: шаги-шевроны, как хлебные крошки процесса. Стрелка режется
// clip-path, поэтому фигура остаётся одним элементом и не требует лишних
// узлов. Номер и подпись стоят в строку, а не столбиком: такая лента не
// растёт по высоте и помещается в шапку формы.
const STYLES = `
:where([data-vibeui-block="stepper-002"]){
--vibeui-stepper-002-bg:oklch(1 0 0);
--vibeui-stepper-002-fg:oklch(0.24 0.016 265);
--vibeui-stepper-002-muted:oklch(0.56 0.014 265);
--vibeui-stepper-002-border:oklch(0.92 0.006 265);
--vibeui-stepper-002-step:oklch(0.968 0.004 265);
--vibeui-stepper-002-accent:oklch(0.55 0.2 262);
--vibeui-stepper-002-accent-fg:oklch(1 0 0);
--vibeui-stepper-002-done:oklch(0.55 0.14 155);
--vibeui-stepper-002-notch:0.75rem;
--vibeui-stepper-002-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="stepper-002"]{
container-type:inline-size;width:100%;box-sizing:border-box;
font-family:var(--vibeui-stepper-002-font);color:var(--vibeui-stepper-002-fg);
}
[data-vibeui-block="stepper-002"] [data-part="shell"]{
background:var(--vibeui-stepper-002-bg);
border:1px solid var(--vibeui-stepper-002-border);
border-radius:0.75rem;overflow:hidden;
}
[data-vibeui-block="stepper-002"] ol{
display:flex;margin:0;padding:0;list-style:none;overflow-x:auto;
}
[data-vibeui-block="stepper-002"] li{
flex:1 1 0;min-width:8rem;position:relative;
background:var(--vibeui-stepper-002-step);
}
/* Шеврон: вырез слева и остриё справа режутся одним clip-path. */
[data-vibeui-block="stepper-002"] li:not(:first-child){
margin-left:calc(var(--vibeui-stepper-002-notch) * -1);
clip-path:polygon(0 0,calc(100% - var(--vibeui-stepper-002-notch)) 0,100% 50%,calc(100% - var(--vibeui-stepper-002-notch)) 100%,0 100%,var(--vibeui-stepper-002-notch) 50%);
padding-left:var(--vibeui-stepper-002-notch);
}
[data-vibeui-block="stepper-002"] li:first-child{
clip-path:polygon(0 0,calc(100% - var(--vibeui-stepper-002-notch)) 0,100% 50%,calc(100% - var(--vibeui-stepper-002-notch)) 100%,0 100%);
}
[data-vibeui-block="stepper-002"] li:last-child{clip-path:none;padding-right:0.5rem}
[data-vibeui-block="stepper-002"] li:last-child:not(:first-child){
clip-path:polygon(0 0,100% 0,100% 100%,0 100%,var(--vibeui-stepper-002-notch) 50%);
}
[data-vibeui-block="stepper-002"] [data-part="body"]{
display:flex;align-items:center;gap:0.5rem;
padding:0.625rem 0.75rem 0.625rem 1rem;min-width:0;
}
[data-vibeui-block="stepper-002"] [data-part="mark"]{
flex:none;display:flex;align-items:center;justify-content:center;
width:1.375rem;height:1.375rem;border-radius:9999px;
background:var(--vibeui-stepper-002-bg);color:var(--vibeui-stepper-002-muted);
border:1px solid var(--vibeui-stepper-002-border);
font-size:0.6875rem;font-weight:700;line-height:1;
}
[data-vibeui-block="stepper-002"] [data-part="label"]{
font-size:0.8125rem;font-weight:500;line-height:1.2;
white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
[data-vibeui-block="stepper-002"] li[data-state="todo"] [data-part="label"]{color:var(--vibeui-stepper-002-muted)}
[data-vibeui-block="stepper-002"] li[data-state="done"]{
background:color-mix(in oklab,var(--vibeui-stepper-002-done) 12%,oklch(1 0 0));
}
[data-vibeui-block="stepper-002"] li[data-state="done"] [data-part="mark"]{
background:var(--vibeui-stepper-002-done);color:var(--vibeui-stepper-002-accent-fg);
border-color:var(--vibeui-stepper-002-done);
}
[data-vibeui-block="stepper-002"] li[data-state="current"]{
background:var(--vibeui-stepper-002-accent);
}
[data-vibeui-block="stepper-002"] li[data-state="current"] [data-part="label"]{
color:var(--vibeui-stepper-002-accent-fg);font-weight:650;
}
[data-vibeui-block="stepper-002"] li[data-state="current"] [data-part="mark"]{
background:var(--vibeui-stepper-002-accent-fg);color:var(--vibeui-stepper-002-accent);
border-color:transparent;
}
[data-vibeui-block="stepper-002"] [data-part="sr"]{
position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;
}
@container (max-width: 32rem){
[data-vibeui-block="stepper-002"] [data-part="shell"] li:not([data-state="current"]) [data-part="label"]{
position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;
}
[data-vibeui-block="stepper-002"] [data-part="shell"] li{min-width:0}
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="stepper-002"] *{animation:none!important;transition:none!important}}
`
const DEFAULT_STEPS = ["Данные", "Доставка", "Оплата", "Готово"]
/**
* Лента шагов-шевронов с номерами: пройденные отмечены галочкой и словом.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Stepper002({
steps = DEFAULT_STEPS,
current = 1,
label = "Оформление заказа",
accent,
className,
style,
...props
}: Stepper002Props) {
const palette = {
...(accent ? { "--vibeui-stepper-002-accent": accent } : null),
...style,
} as CSSProperties
return (
<>
<style href="vibeui-stepper-002" precedence="medium">
{STYLES}
</style>
<nav
{...props}
data-vibeui-block="stepper-002"
aria-label={label}
className={className}
style={palette}
>
<div data-part="shell">
<ol>
{steps.map((step, index) => {
const state =
index < current
? "done"
: index === current
? "current"
: "todo"
return (
<li
key={step}
data-state={state}
aria-current={state === "current" ? "step" : undefined}
>
<span data-part="body">
<span data-part="mark" aria-hidden="true">
{state === "done" ? "✓" : index + 1}
</span>
<span data-part="label">{step}</span>
<span data-part="sr">
{state === "done"
? " — шаг пройден"
: state === "current"
? " — текущий шаг"
: " — впереди"}
</span>
</span>
</li>
)
})}
</ol>
</div>
</nav>
</>
)
}