Trivela UI

Separator

A one pixel rule that divides content, with color token support.

There is no orientation prop: the rule is h-px w-full, so a vertical one is a className away — see Vertical below.

Trivela UI

An open source component library.

Usage

separator-demo.tsx
import { Separator } from 'trivela-ui';

export function Example() {
  return <Separator />;
}

Examples

Horizontal

The default: a full width rule for splitting stacked content.

Trivela UI

An open source component library.

Built with Tailwind and design tokens.

Vertical

Swap the axis with className — w-px h-full instead of h-px w-full.

Docs
Source
Registry

Colors

The color token sets the rule at the 200 step — light enough to divide without competing with the content.

neutral

primary

secondary

success

warning

danger

info

Semantics

Add role=separator when the rule carries meaning, or leave it out when it is purely decorative.

Section one

Section two

API Reference

PropTypeDefaultDescription
color'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral''neutral'Color scale for the rule.
classNamestringMerged with the generated classes via cn().
...propsHTMLAttributes<HTMLDivElement>All native attributes are forwarded to the root element.