Display

Scaled Space Divider

A divider with scale-based spacing: five steps are multiples of one unit, so two boundaries in different parts of the page breathe alike.

  • separator
  • spacing
  • scale
  • rhythm

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-006?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 "separator-006" (Scaled Space Divider) 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-006.json

Registry item: https://vibeui.ru/r/separator-006.json
Installs to: components/vibeui/separator-006.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 divider with scale-based spacing: five steps are multiples of one unit, so two boundaries in different parts of the page breathe alike.

A divider with scaled spacing: five steps from a single unit plus an optional inset. Zero dependencies, one file, no client JS.

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

<Separator006 space="lg" inset />

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-006-* palette — do not swap it for your theme tokens
- the steps as multiples of a shared unit: loose values scatter the vertical rhythm
- the spacing on the divider itself — on neighbouring blocks it collapses and turns unpredictable
- the hr tag with its border removed: this is a semantic boundary, not a decorative line
- the inset as its own variable so it can be turned off without touching vertical spacing
- the component's own light surface: the list rows are dark and vanish on a dark background

## 6. You may change
- the spacing step through space: xs, sm, md, lg or xl
- the line inset through inset
- the scale unit through the --vibeui-separator-006-step variable
- the line colour through the --vibeui-separator-006-line variable

## 7. Rules
- The xl step is meant for sections, not list rows: in a dense list it severs the connection.
- The 1rem inset is tuned to the card padding — recalculate it for a different padding.
- The scale does not govern the spacing of neighbouring blocks: their rhythm comes from outside.
- 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-006.json
https://vibeui.ru/r/separator-006.json

Серверный компонент, хуков нет. Шкала отступов объявлена как кратные переменной --vibeui-separator-006-step, а ступени xs…xl переключаются атрибутом data-space — правится шкала одним числом, а не пятью значениями. Отступ живёт на самом разделителе, а не на соседних блоках: так соседи ничего не знают друг о друге и не схлопывают margin. Втяжка включается булевым пропом inset и задаётся отдельной переменной, чтобы линия отходила от краёв списка, как в системных таблицах. Подложка светлая: строки списка набраны тёмным.

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 Separator006Space = "xs" | "sm" | "md" | "lg" | "xl"

export type Separator006Props = Omit<
  ComponentPropsWithoutRef<"div">,
  "children"
> & {
  space?: Separator006Space
  inset?: boolean
}

// Идея компонента: разделитель, у которого отступы взяты со шкалы, а не
// подобраны по месту. Шаг один — 0.25rem, ступени кратны ему, поэтому две
// границы в разных частях страницы дышат одинаково и вертикальный ритм не
// рассыпается. Отступ задан переменной на самом разделителе: соседние блоки
// про него ничего не знают и не схлопывают margin друг друга.
const STYLES = `
:where([data-vibeui-block="separator-006"]){
--vibeui-separator-006-step:0.25rem;
--vibeui-separator-006-space:calc(var(--vibeui-separator-006-step) * 4);
--vibeui-separator-006-inset:0rem;
--vibeui-separator-006-line:oklch(0.89 0.006 265);
--vibeui-separator-006-surface:oklch(1 0 0);
--vibeui-separator-006-border:oklch(0.91 0.006 265);
--vibeui-separator-006-fg:oklch(0.26 0.014 265);
--vibeui-separator-006-muted:oklch(0.55 0.014 265);
--vibeui-separator-006-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
/* Своя светлая подложка: строки списка набраны тёмным. */
[data-vibeui-block="separator-006"]{
display:block;
width:100%;max-width:22rem;box-sizing:border-box;padding:0.875rem 1rem;
background:var(--vibeui-separator-006-surface);
border:1px solid var(--vibeui-separator-006-border);border-radius:0.875rem;
font-family:var(--vibeui-separator-006-font);color:var(--vibeui-separator-006-fg);
font-size:0.8125rem;
}
[data-vibeui-block="separator-006"] [data-part="row"]{
display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:0;
}
[data-vibeui-block="separator-006"] [data-part="hint"]{color:var(--vibeui-separator-006-muted)}
/* Отступ живёт на разделителе: соседи не схлопывают его margin. */
[data-vibeui-block="separator-006"] [data-part="rule"]{
height:1px;border:0;
margin:var(--vibeui-separator-006-space) var(--vibeui-separator-006-inset);
background:var(--vibeui-separator-006-line);
}
[data-vibeui-block="separator-006"][data-space="xs"]{--vibeui-separator-006-space:calc(var(--vibeui-separator-006-step) * 1)}
[data-vibeui-block="separator-006"][data-space="sm"]{--vibeui-separator-006-space:calc(var(--vibeui-separator-006-step) * 2)}
[data-vibeui-block="separator-006"][data-space="md"]{--vibeui-separator-006-space:calc(var(--vibeui-separator-006-step) * 4)}
[data-vibeui-block="separator-006"][data-space="lg"]{--vibeui-separator-006-space:calc(var(--vibeui-separator-006-step) * 6)}
[data-vibeui-block="separator-006"][data-space="xl"]{--vibeui-separator-006-space:calc(var(--vibeui-separator-006-step) * 9)}
[data-vibeui-block="separator-006"][data-inset="true"]{--vibeui-separator-006-inset:1rem}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="separator-006"] *{animation:none!important;transition:none!important}}
`

const ROWS = [
  { title: "Профиль", hint: "изменён вчера" },
  { title: "Уведомления", hint: "включены" },
  { title: "Экспорт данных", hint: "готов" },
]

/**
 * Разделитель с отступами по шкале: пять ступеней от одного шага.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Separator006({
  space = "md",
  inset = false,
  className,
  style,
  ...props
}: Separator006Props) {
  return (
    <>
      <style href="vibeui-separator-006" precedence="medium">
        {STYLES}
      </style>
      <div
        {...props}
        data-vibeui-block="separator-006"
        data-space={space}
        data-inset={inset}
        className={className}
        style={style as CSSProperties}
      >
        {ROWS.map((row, index) => (
          <div key={row.title}>
            {index > 0 ? <hr data-part="rule" /> : null}
            <p data-part="row">
              <span>{row.title}</span>
              <span data-part="hint">{row.hint}</span>
            </p>
          </div>
        ))}
      </div>
    </>
  )
}