Divider
Line separator with horizontal and vertical orientation, default and spaced variants.
Installation
dgadd ships in @diffgazer/add on npm: pnpm add -D @diffgazer/add puts it on pnpm exec, and npx @diffgazer/add runs it without the install.
UI components require Tailwind CSS v4. Local copy mode imports src/styles/styles.css; package mode uses @diffgazer/ui CSS from the installed package.
Usage
Examples
Variants
Custom Label
Vertical (plain and spaced)
Semantic (non-decorative)
API Reference
Divider
Accessibility
Notes
Spaced Variant
The spaced variant renders a centered label between two rules with margin. Pass children to customize the label; defaults to ✦ when no children are provided. The label renders at full muted-foreground contrast (only the rules are dimmed) and is uppercase and tracked so divider labels share the SectionHeader vocabulary. The default variant is a simple line.
Vertical Orientation
Set orientation="vertical" to render a vertical separator. Works with both default and spaced variants. The parent must define a height for the divider to fill.
Decorative vs Semantic
By default, decorative is true — the divider renders with role="none" so screen readers skip it, including a spaced label such as "or", which is presentational reinforcement of a choice the surrounding controls already express. Set decorative={false} when the separator marks a real structural boundary between distinct page sections, and provide an explicit aria-label. Visible children do not name a separator.
Source
Install via CLI: pnpm exec dgadd add ui/divider.
Highlighted source loads after this disclosure opens. Browse the source repository.