Display

Vertical Stat Rules

A row of stats with vertical rules: the line takes its height from the neighbours instead of setting it, so the row never grows because of the rule.

  • separator
  • vertical
  • stats
  • row

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/separator-003?lang=en

128компонентов
24категории
0зависимостей
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 "separator-003" (Vertical Stat Rules) 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/separator-003.json

Registry item: https://vibeui.ru/r/separator-003.json
Installs to: components/vibeui/separator-003.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 row of stats with vertical rules: the line takes its height from the neighbours instead of setting it, so the row never grows because of the rule.

A stat row with vertical rules: the line stretches to the neighbours' height or to the value line. Zero dependencies, one file, no client JS.

## 3. How to use it
import { Separator003 } from "@/components/vibeui/separator-003"

<Separator003
  items={[{ value: "128", caption: "components" }, { value: "24", caption: "categories" }]}
  gap={20}
  dividerHeight="full"
/>

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-separator-003-* palette — do not swap it for your theme tokens
- align-items:stretch on the row: without it the rule collapses to zero height
- the absence of a fixed height on the rule — set by hand it drifts away from the neighbours
- role=separator with vertical orientation: otherwise the boundary between numbers is inaudible
- the tabular figures in the values: proportional ones vary in width and make the column jitter
- the component's own light surface: numbers and captions are dark and vanish on a dark background

## 6. You may change
- the spacing between blocks through gap in pixels
- the rule height through dividerHeight: text or full
- the stat set through items
- the rule colour through the --vibeui-separator-003-line variable

## 7. Rules
- The row does not wrap: four or more stats run off the edge on a phone.
- The gap is in pixels, not rem: it does not scale with the type size.
- Captions are nowrap — a long word stretches the row instead of wrapping.
- 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/separator-003.json
https://vibeui.ru/r/separator-003.json

Серверный компонент, хуков нет. Ряд выровнен align-items:stretch, из-за чего разделитель шириной в один пиксель сам вытягивается до высоты самого высокого блока — задавать ему height вручную не нужно и вредно. Режим text ограничивает линию высотой строки значения: так делают в шапках, где полная линия выглядит как граница таблицы. Каждый разделитель помечен role=separator с aria-orientation=vertical, поэтому граница между показателями слышна. Промежуток вынесен в проп gap и подставляется переменной в пикселях. Подложка светлая: цифры и подписи тёмные.

Component source

The same file your agent installs. Here in case you would rather copy it by hand.

import { Fragment } from "react"
import type { ComponentPropsWithoutRef, CSSProperties } from "react"

export type Separator003Item = { value: string; caption: string }

export type Separator003Props = Omit<
  ComponentPropsWithoutRef<"div">,
  "children"
> & {
  items?: Separator003Item[]
  gap?: number
  dividerHeight?: "text" | "full"
}

// Идея компонента: вертикальные разделители между блоками одной строки.
// Линия не задаёт высоту строки, а берёт её у соседей: при dividerHeight
// "full" ряд растянут align-items:stretch, и линия сама вытягивается до
// высоты самого высокого блока. Вариант "text" ограничивает её строкой
// значения — так делают в шапках, где полная линия выглядит как граница
// таблицы. Разделители помечены role="separator" с вертикальной ориентацией.
const STYLES = `
:where([data-vibeui-block="separator-003"]){
--vibeui-separator-003-gap:20px;
--vibeui-separator-003-line:oklch(0.88 0.006 265);
--vibeui-separator-003-surface:oklch(1 0 0);
--vibeui-separator-003-border:oklch(0.91 0.006 265);
--vibeui-separator-003-fg:oklch(0.24 0.014 265);
--vibeui-separator-003-muted:oklch(0.55 0.014 265);
--vibeui-separator-003-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
/* Своя светлая подложка: цифры и подписи тёмные. */
[data-vibeui-block="separator-003"]{
display:inline-flex;align-items:stretch;
gap:var(--vibeui-separator-003-gap);
box-sizing:border-box;padding:0.875rem 1.125rem;
background:var(--vibeui-separator-003-surface);
border:1px solid var(--vibeui-separator-003-border);border-radius:0.875rem;
font-family:var(--vibeui-separator-003-font);color:var(--vibeui-separator-003-fg);
}
[data-vibeui-block="separator-003"] [data-part="cell"]{
display:flex;flex-direction:column;gap:0.125rem;min-width:0;
}
[data-vibeui-block="separator-003"] [data-part="value"]{
font-size:1.125rem;font-weight:700;line-height:1.2;
font-variant-numeric:tabular-nums;
}
[data-vibeui-block="separator-003"] [data-part="caption"]{
font-size:0.75rem;color:var(--vibeui-separator-003-muted);white-space:nowrap;
}
/* Линия берёт высоту у соседей, а не задаёт её: строка не растёт от линии. */
[data-vibeui-block="separator-003"] [data-part="rule"]{
flex:none;width:1px;background:var(--vibeui-separator-003-line);
}
[data-vibeui-block="separator-003"][data-height="text"] [data-part="rule"]{
align-self:flex-start;height:1.375rem;
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="separator-003"] *{animation:none!important;transition:none!important}}
`

const DEFAULT_ITEMS: Separator003Item[] = [
  { value: "128", caption: "компонентов" },
  { value: "24", caption: "категории" },
  { value: "0", caption: "зависимостей" },
]

/**
 * Строка показателей с вертикальными разделителями между блоками.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Separator003({
  items = DEFAULT_ITEMS,
  gap = 20,
  dividerHeight = "full",
  className,
  style,
  ...props
}: Separator003Props) {
  const palette = {
    "--vibeui-separator-003-gap": `${gap}px`,
    ...style,
  } as CSSProperties

  return (
    <>
      <style href="vibeui-separator-003" precedence="medium">
        {STYLES}
      </style>
      <div
        {...props}
        data-vibeui-block="separator-003"
        data-height={dividerHeight}
        className={className}
        style={palette}
      >
        {items.map((item, index) => (
          <Fragment key={item.caption}>
            {index > 0 ? (
              <span
                data-part="rule"
                role="separator"
                aria-orientation="vertical"
              />
            ) : null}
            <div data-part="cell">
              <span data-part="value">{item.value}</span>
              <span data-part="caption">{item.caption}</span>
            </div>
          </Fragment>
        ))}
      </div>
    </>
  )
}