elements
Blog Demos UI Docs Pricing
Elements Manual
  • Getting Started
  • CLI
  • Build
  • Browser
  • Packages
  • TypeScript
  • Elements HTML
  • Assets
  • RPC
  • Router
  • Session
  • Database
  • Migrations
  • LiveTable
  • Channel
  • Jobs
  • Email
  • Payments
  • JSON
  • Async
  • Style
  • UI
    • Templates
    • Behaviors
    • Themes
  • JSOC
  • Config
  • Tests
  • Logs
  • Deploy
  • Editors
  • Recipes
  • Licenses
Manual / UI/ Templates/ Separator

Separator

elements man ui/templates/separator

A horizontal or vertical rule between content, semantic or decorative.

Example
import { Separator } from "@elements/ui/separator"; <Separator /> <Separator orientation="vertical" /> <Separator decorative /> <Separator label="or" />

Parts

Part What it is
.separator The rule. --separator-width and --separator-color restyle it.
.separator.is-labeled A rule with text centered in it.

Attributes

Attribute Type Default Description
orientation "horizontal" | "vertical" "horizontal" Direction of the rule.
decorative boolean false Purely visual: role=none, removed from the accessibility tree.
label string "" Text in the middle of the rule, such as "or". Names a semantic separator.
class string "" Extra classes.
attrs Record<string, string | number | boolean | undefined> {} Any other attributes: id, data-*.

Data attributes

Attribute Values On
data-orientation "horizontal" | "vertical" root

Accessibility

  • role="separator" by default; aria-orientation="vertical" only when vertical, since horizontal is implicit.
  • decorative sets role="none" for rules between things that already read as separate.
  • A labeled separator is named by its label, because a separator's children are not read.
  • Not focusable: a draggable divider is Resizable's job.

See also

  • Badge (opens in a new tab): A small label for a status, a count or a category, built on the pill.
  • Card (opens in a new tab): A surface with a header, body and footer, built on the base card styles.
  • Alert (opens in a new tab): A callout that draws attention to a message, with an icon, a title and an action.
  • Icon (opens in a new tab): An inline stroke icon from the set the templates draw their own controls with, sized in pixels and colored by the text around it.
  • Kbd (opens in a new tab): A keyboard key or shortcut, as text.
  • Skeleton (opens in a new tab): A placeholder shape shown while content loads, or wrapped around the content so it never moves.
Prev KbdNext Skeleton
Product
Manual Pricing Compare
Company
History Contact
Legal
Privacy Policy Acceptable Use Terms License Agreement
© Elements Dev Corporation 2026