Separator

Separators divide related sections while keeping the layout quiet and scannable.

Overview and decision boundary

Use Separator to divide related content sections without adding visual weight.

Do not use separators as a replacement for spacing rhythm.

Overview
Activity
import { Separator } from '@nerio-ui/ui';<Separator /><Separator orientation="vertical" />

Installation and imports

Install the editable registry source, or use the matching package entrypoint when the product keeps Nerio as a workspace dependency.

pnpm exec nerio add separatorimport { Separator } from '@nerio-ui/ui';

Usage

import { Separator } from '@nerio-ui/ui';<Separator /><Separator orientation="vertical" />

Variants

VariantPurpose
orientation: horizontal | verticalOrientation: horizontal | vertical is part of the public component contract.

Anatomy

SlotPurpose
rootNative rule using the subtle border token.

States

StatePurpose
StaticUses native hr semantics without interaction or motion.

Motion

  • State changes should use shared motion tokens and preserve reduced-motion behavior.

Accessibility

  • Renders an hr element for semantic separation.
  • Use for related sections, not as a replacement for spacing.
  • Keep separators subtle across themes.

Review the shared responsibility and evidence boundaries in the Accessibility foundation alongside this component-specific contract. Use the Spacing & layout foundation for shared density, wrapping, overflow, reflow, and component-versus-product ownership guidance. The Color foundation, Typography foundation, and Localization foundation define the shared visual-role, text-resilience, direction, and locale boundaries used by component examples.

API

PropPurpose
classNameExtends the component root while preserving Nerio tokenized defaults.

Implementation contract

ContractValue
Registry itemseparator installs 5 source files into the configured components directory.
Base UINo interactive primitive required.
Registry dependenciesNone.
Package dependenciesclsx, react, tailwind-merge, tailwindcss

Styling contract

ContractValue
AuthoringComplete, statically detectable Tailwind CSS v4 recipes own component visuals.
ValuesSemantic and component --n-* variables remain the canonical customization layer.
OverridesCustomizable slots merge consumer className values with tailwindCn so conflicting utilities resolve deterministically.
Residual CSSOnly shared keyframes and scoped no-Preflight compatibility rules remain; there is no parallel visual selector layer.

Design notes

  • Use Separator to divide related content sections without adding visual weight.

Do / do not

Do

Use separators sparingly to support scanability.

Do not

Do not use separators as a replacement for spacing rhythm.

Tokens

These are the primary customization points. Override semantic or component tokens instead of changing component source.

TokenPurpose
--n-color-border-subtlePublic customization point for this component contract.