suiss/ui · Component
Separator
A thin line that visually divides content, horizontally or vertically.
Separator is an open-source component from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
Separator wraps the separator primitive of the chosen base. It draws a 1px line in the border color: full width when horizontal, and stretched to the container's height when vertical.
Use it between groups of content or between inline items. Inside menus and selects, use the dedicated separator part of that component instead.
Installation
CLI
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Manual
- Install the dependencies and add the
cnhelper:
- Copy the source into
components/ui/separator.tsx:
- Update the import paths to match your project.
Usage
orientation defaults to horizontal. Set orientation="vertical" inside a flex row; the line stretches to the row's height, so give the row a height.
Examples
Horizontal
Divides two stacked lines of text.
Vertical
Divides inline links in a row.
API Reference
Separator
Draws the dividing line.
Also accepts the props of the primitive part it wraps.
Accessibility
- Renders with the
separatorrole and anaria-orientationthat matchesorientation.
Notes
- Uses
data-slot="separator", and the primitive's orientation attributes set its size. - The color comes from the
bg-bordertoken.
Separator is a View drawn as a one-pixel line. Horizontal separators fill the width of their container; vertical separators stretch to the height of a row.





