Separator
Visual divider between content sections in horizontal or vertical orientation.
Horizontal
The default orientation renders a full-width horizontal rule using Visor border tokens.
Section A
Section B
Vertical
Set orientation="vertical" to render a vertical divider between inline elements.
Label
Pass label to draw a word centred on the rule, with the rule on both sides. Both lines use the same border token as the bare separator. label applies to horizontal separators only.
Theming
The rule colour reads --separator-color, falling back to --border-default. Themes with transparent borders bind components.separator.color so the rule stays visible.
Installation
npx visor add separatorThis copies two files into your project:
components/ui/separator/separator.tsx— the componentcomponents/ui/separator/separator.module.css— the styles
Usage
import { Separator } from '@/components/ui/separator/separator';
<Separator />
<Separator orientation="vertical" />
<Separator label="or" />API Reference
SeparatorProps
No props data available for “separator”.
The component also accepts all standard Radix UI Separator props.
Accessibility
- Built on
@radix-ui/react-separatorwith correctrole="separator"semantics. - Set
decorative={false}when the separator conveys meaningful content grouping that screen readers should announce. - Decorative separators (the default) are hidden from the accessibility tree with
role="none". - A separator with a
labelis never decorative: it rendersrole="separator"named by the label, so the word is read. Thedecorativeprop is ignored whenlabelis set.