Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Containers

  • Layout
  • AdminLayout
  • SettingsLayout
  • ScrollArea
  • Viewport
  • Resizable
  • AspectRatio
  • FitScreen
  • PreviewSandbox
  • Masonry
  • Container
  • AccentScope

Arrangement

  • Stack
  • Grid
  • Spacer
  • Divider
  • Separator

Separator

separator

Renders an accessible horizontal or vertical separator with correct geometry.

Usage

Horizontal separation

In the default direction, a horizontal line filling the width is rendered to separate the upper and lower content.

Hulian Design System

Absorption aggregation component library

tsx
<div className="w-48">
  <p>Hulian Design System</p>
  <Separator className="my-3" />
  <p>Suction-type aggregation component library</p>
</div>

Vertical separation

Use orientation="vertical" to draw vertical lines to the full height inside the flex container.

Documentation
Components
Theme
tsx
<div className="flex h-6 items-center gap-3">
  <span>Documentation</span>
  <Separator orientation="vertical" />
  <span>Component</span>
  <Separator orientation="vertical" />
  <span>Theme</span>
</div>

When to use

Use Separator for a purely geometric horizontal or vertical rule with ARIA role="separator", such as structural grouping or menu and list boundaries. Use Divider when the separator needs a label, dashed styling, or left/right label alignment.

Import

ts
import { Separator } from "@hulianui/ui"

Props

NameTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Horizontal renders an h-px rule; vertical renders w-px and requires parent height.
classNamestring-Additional class name.

Example

tsx
// Horizontal separator
<p>Hulian Design System</p>
<Separator className="my-3" />
<p>Composable component library</p>

// Vertical separator; the parent supplies height
<div className="flex h-6 items-center gap-3">
  <span>Documentation</span>
  <Separator orientation="vertical" />
  <span>Components</span>
</div>

Usage guidelines

A vertical Separator supplies only w-px; its height comes from the parent. Give the surrounding row a height such as h-6, or the separator can resolve to zero height and remain invisible.

Related

Stack · Grid · Spacer · Divider · Layout · AdminLayout

Playground

Hulian Design System

Absorption aggregation component library

<Separator />
PreviousDividerLayoutNextAccentScope

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Example
    • Usage guidelines
    • Related
  • Playground