Skip to content
ComponentsMarkdown

Separator

Divide adjacent content sections with a 1px --border hairline horizontally or vertically.

Live example

Token layers

Primitives, semantics, and component contracts.

Primitive
Semantic
Component

Props

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Axis of the 1px divider line.
decorativebooleantrueRenders role="none" when true, or role="separator" with aria-orientation when false.

Sizes and tokens

Tier / RoleTokenValue
Color--borderNeutral step 7
Thickness--border-width-11px

States

decorative=true (default, role="none")

decorative=false (role="separator")

Code

import { Separator } from "@freshgemui/monoplinth";

export function Example() {
  return (
    <div className="space-y-4">
      <p>Section one</p>
      <Separator />
      <p>Section two</p>
    </div>
  );
}

Do and don't

Do: Keep decorative=true for purely visual dividers
Leave decorative at its default true when headings or lists already convey the section structure.
Don't: Expose every hairline to screen readers
Do not set decorative={false} unless the divider marks a meaningful content boundary not represented by landmarks or headings.

Accessibility

  • Defaults to role="none" so decorative hairlines do not clutter screen-reader navigation.
  • Setting decorative={false} renders role="separator" with aria-orientation matching orientation.

Rationale

A hand-rolled div with bg-border avoids an external Radix dependency for a two-prop hairline primitive while preserving exact ARIA semantics.