separator
A thin visual divider built on Radix UI's Separator primitive that renders a 1px line (horizontal or vertical) in the design system border color. It is decorative by default, hiding the line from assistive technology.


Installed with shadcn add · 1 workaround · theme from registry.json
- installed base item https://design.yukihi.tokyo/v1/r/design-system-styles.json (registry preview settings)
Installation
Requires @yukihi in the registries of your components.json (shadcn adds official directory namespaces automatically).
Usage
import { Separator } from "@/components/ui/separator"export function Example() { return <Separator />}- Splitting distinct sections of a page, card, or form with a subtle horizontal rule
- Separating inline items such as toolbar buttons, menu entries, or breadcrumbs with a vertical rule
- Marking a semantic boundary between content that assistive technology should announce by setting decorative={false}
- Replacing ad-hoc border-t or border-l utility classes with a consistent, themeable divider
Examples
Horizontal divider between sections
A default horizontal separator dividing two stacked blocks of content.
import { Separator } from "@/components/ui/separator"export function SectionDivider() { return ( <div className="space-y-4"> <section> <h2 className="text-lg font-semibold">Profile</h2> <p className="text-sm text-muted-foreground">Manage your account details.</p> </section> <Separator /> <section> <h2 className="text-lg font-semibold">Security</h2> <p className="text-sm text-muted-foreground">Update your password.</p> </section> </div> )}Vertical divider in a toolbar
A vertical separator inside a flex row to group related actions. The parent must give it a height for it to be visible.
import { Separator } from "@/components/ui/separator"export function Toolbar() { return ( <div className="flex h-9 items-center gap-2"> <button type="button">Bold</button> <button type="button">Italic</button> <Separator orientation="vertical" /> <button type="button">Link</button> </div> )}Non-decorative separator
Setting decorative to false exposes the separator to assistive technology as a semantic separator element.
import { Separator } from "@/components/ui/separator"export function MenuGroups() { return ( <nav> <ul> <li>Dashboard</li> </ul> <Separator decorative={false} /> <ul> <li>Sign out</li> </ul> </nav> )}API reference
Accessibility
- By default decorative is true, so the separator is removed from the accessibility tree and screen readers skip it.
- Set decorative={false} only when the divider conveys a meaningful boundary; it then gets role="separator" and aria-orientation.
- Because the component is purely visual, do not rely on it alone to communicate structure; pair it with headings or landmarks where needed.
- The bg-border color is a low-contrast hairline, so it should not be the sole indicator of a boundary for users with low vision.
Docs written by anthropic:claude-haiku-5-5 from the registry source.
Use with Coding Agent
Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.
Use the "separator" component (yukihi/separator) from its shadcn registry.1. Install it with: npx shadcn@latest add @yukihi/separator2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: orientation, decorative, className, ...props.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { Separator } from "@/components/ui/separator"export function Example() { return <Separator />}```Files & dependencies
- registry/new-york/ui/separator/separator.tsx→ @ui/separator.tsx