Display

Dashed Rule Divider

A dashed divider with a controllable pattern: dash length and gap are set as numbers, so the same dash repeats identically across the layout.

  • separator
  • dashed
  • gradient
  • divider

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-004?lang=en

Личные данныезаполнено


Оплаташтрих 6 / 6

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-004" (Dashed Rule 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-004.json

Registry item: https://vibeui.ru/r/separator-004.json
Installs to: components/vibeui/separator-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 dashed divider with a controllable pattern: dash length and gap are set as numbers, so the same dash repeats identically across the layout.

A dashed divider built on repeating-linear-gradient with an exact dash length and gap. Zero dependencies, one file, no client JS.

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

<Separator004 above="Personal data" below="Payment" dash={6} gap={6} />

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-004-* palette — do not swap it for your theme tokens
- the gradient instead of border-dashed: a border's dash length depends on the browser
- the hr tag with its border removed — this is a semantic boundary, not a decorative div
- the equal default dash and gap: unequal values read as a rendering glitch
- the one-pixel line thickness, otherwise the dash turns into a row of slabs
- the component's own light surface: the section captions are dark and vanish on a dark background

## 6. You may change
- the dash length through dash in pixels
- the space between dashes through gap in pixels
- the section captions through above and below
- the line colour through the --vibeui-separator-004-line variable

## 7. Rules
- The dash pattern is not fitted to the width: the last dash may be cut at any width.
- A vertical dash needs the gradient angle changed from 90deg to 180deg.
- Pixel values do not scale with the type size: the dash looks tiny next to large text.
- 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-004.json
https://vibeui.ru/r/separator-004.json

Серверный компонент, хуков нет. border-style:dashed рисует штрих, длина которого зависит от браузера и от толщины границы, — одинакового пунктира в двух местах макета так не добиться. Здесь линия набрана repeating-linear-gradient, где длина штриха и промежуток вынесены в переменные --vibeui-separator-004-dash и --vibeui-separator-004-gap и подставляются из пропов в пикселях. Разделитель набран тегом hr со снятой рамкой, поэтому граница видна и скринридеру. Компонент показан в контексте двух строк раздела и несёт свою светлую подложку: подписи тёмные.

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 Separator004Props = Omit<
  ComponentPropsWithoutRef<"div">,
  "children"
> & {
  above?: string
  below?: string
  dash?: number
  gap?: number
}

// Идея компонента: пунктирная линия с управляемым рисунком. border-style
// dashed рисует штрих, длина которого зависит от браузера и от толщины
// границы — одинакового пунктира в двух местах макета так не добиться. Здесь
// линия набрана repeating-linear-gradient: длина штриха и промежуток заданы
// числами, поэтому рисунок повторяем и предсказуем.
const STYLES = `
:where([data-vibeui-block="separator-004"]){
--vibeui-separator-004-dash:6px;
--vibeui-separator-004-gap:6px;
--vibeui-separator-004-line:oklch(0.78 0.01 265);
--vibeui-separator-004-surface:oklch(1 0 0);
--vibeui-separator-004-border:oklch(0.91 0.006 265);
--vibeui-separator-004-fg:oklch(0.26 0.014 265);
--vibeui-separator-004-muted:oklch(0.55 0.014 265);
--vibeui-separator-004-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
/* Своя светлая подложка: подписи разделов тёмные. */
[data-vibeui-block="separator-004"]{
display:flex;flex-direction:column;gap:0.75rem;
width:100%;max-width:22rem;box-sizing:border-box;padding:0.875rem 1rem;
background:var(--vibeui-separator-004-surface);
border:1px solid var(--vibeui-separator-004-border);border-radius:0.875rem;
font-family:var(--vibeui-separator-004-font);color:var(--vibeui-separator-004-fg);
font-size:0.8125rem;
}
[data-vibeui-block="separator-004"] [data-part="row"]{
display:flex;align-items:center;justify-content:space-between;gap:1rem;
}
[data-vibeui-block="separator-004"] [data-part="hint"]{
color:var(--vibeui-separator-004-muted);font-variant-numeric:tabular-nums;
}
/* Градиент вместо border-dashed: длина штриха задана числом и повторяема. */
[data-vibeui-block="separator-004"] [data-part="rule"]{
height:1px;border:0;margin:0;
background-image:repeating-linear-gradient(90deg,
var(--vibeui-separator-004-line) 0,
var(--vibeui-separator-004-line) var(--vibeui-separator-004-dash),
transparent var(--vibeui-separator-004-dash),
transparent calc(var(--vibeui-separator-004-dash) + var(--vibeui-separator-004-gap)));
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="separator-004"] *{animation:none!important;transition:none!important}}
`

/**
 * Пунктирный разделитель с управляемой длиной штриха и промежутка.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Separator004({
  above = "Личные данные",
  below = "Оплата",
  dash = 6,
  gap = 6,
  className,
  style,
  ...props
}: Separator004Props) {
  const palette = {
    "--vibeui-separator-004-dash": `${dash}px`,
    "--vibeui-separator-004-gap": `${gap}px`,
    ...style,
  } as CSSProperties

  return (
    <>
      <style href="vibeui-separator-004" precedence="medium">
        {STYLES}
      </style>
      <div
        {...props}
        data-vibeui-block="separator-004"
        className={className}
        style={palette}
      >
        <p data-part="row">
          <span>{above}</span>
          <span data-part="hint">заполнено</span>
        </p>
        <hr data-part="rule" />
        <p data-part="row">
          <span>{below}</span>
          <span data-part="hint">
            штрих {dash} / {gap}
          </span>
        </p>
      </div>
    </>
  )
}