Skip to content

Separator

Separate related regions with native semantics. CSS only

Separator
Copy this markup
<hr class="ui-separator">

Install

Styles and registration
import '@timelessui/components/css/tokens.css'
import '@timelessui/components/css/separator.css'

Anatomy

Parts are authored in your own markup and identified by the selector below, so your CSS can target the same anatomy without loading Timeless styles. Required parts must be present for the component to work. Private data-ui-internal-* hooks are written by the runtime and must never be authored.

PartRequiredSelectorPurpose
labelNo[data-ui-part~='label']Optional inline label rendered over the rule.

Attributes

Every value below is implemented by the stylesheets this component ships. Boolean attributes are presence-based: author the attribute with no value, or omit it.

AttributeValuesDefaultDescription
data-ui-orientationhorizontal · verticalhorizontalRule direction. Also set aria-orientation="vertical" on an <hr> when you change this.
data-ui-variantdefault · strong · centereddefaultLine weight and label placement. centered positions the label part in the middle of the rule.

Styling

Root identity: ui-separator. Required stylesheets: tokens.css, separator.css.

This component adds no custom properties of its own. Restyle it through the design tokens or your own CSS.

Design tokens this component reads (7)

These are global Atmosphere tokens. Change them once at the theme level rather than per component.

--ui-fg-muted · --ui-line · --ui-line-strong · --ui-space-2 · --ui-space-3 · --ui-space-4 · --ui-space-5

Accessibility

Keep the native elements, roles, and relationships shown in the example. Timeless adds only the state and keyboard coordination the platform does not already provide, and it never supplies your accessible names — those depend on your content.

Before JavaScript runs

This primitive is CSS only. There is nothing to register and nothing to wait for.

More examples

Open Separator in StoryLite for variants, controls, and manual testing.