Separator

@sushindustries/ui

A rule with two directions and an accessibility decision: announced when it separates content, silent when it is furniture.

4 min read
View as MarkdownEdit on GitHub

Separator draws a rule in either direction, horizontal or vertical. Pass decorative for a purely visual divider that is hidden from screen readers; leave it off when the rule genuinely separates content and should be announced as one.

Viewport width
Phone22remthe floor, the narrowest this promises to work at
tanstacktanstack add https://adamjurek.com/r/tanstack/separator.jsonshadcnpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/separator.json

Why it is built this way

Whether a rule gets announced is an accessibility decision, not a styling one, so decorative swaps the actual element rather than just its look: a real <hr> when it separates content, a styled, aria-hidden span when it is furniture. A data attribute alone could never have carried that distinction honestly.

Install

tanstack add https://adamjurek.com/r/tanstack/separator.json
shell
pnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/separator.json
shell
pnpm add @sushindustries/ui @sushindustries/atoms
shell

What you get

Version0.1.0
Categorylayout · Page structure
Filesseparator.tsx
DependenciesNone
Tagsdivider, no-deps

No runtime dependencies

It brings nothing with it beyond the stylesheet.