Separator
A hairline between content.
- Composed
- New in 0.1
import { Separator, separatorPrimitive } from "nitro-ui-sdk/separator";- HeroUI Native
- Separator
- Expo UI
- Divider

Light 
Dark
On this page
Separator draws a hairline between content: horizontal between rows or sections, vertical between items in a row. The thin line is exactly one device pixel, like UIKit’s separators, in the separator color. It is decorative and never an accessibility element.
ListGroup sections draw their own inset separators between rows; use Separator for layouts you build yourself.
Anatomy
import { Separator } from "nitro-ui-sdk/separator";
<Separator />;
| Part | Description |
|---|---|
root |
The line: a one-point box scaled down to its thickness and shifted to the leading pixel. |
Separator.Root is the same component as Separator.
Usage
import { Separator } from "nitro-ui-sdk/separator";
<Separator />;
Variants and sizes
| Variant | Thickness |
|---|---|
thin |
One device pixel (1/3 pt on a 3x screen). The default. |
thick |
One point. |
orientation is horizontal (the default, stretches to its column’s width) or vertical (stretches to its row’s height). inset keeps points clear at the ends: a number for both ends, or { start, end }, e.g. to align with row text past an icon.
import { View } from "nitro-ui-renderer";
import { Separator } from "nitro-ui-sdk/separator";
import { Text } from "nitro-ui-sdk/text";
<Separator inset={{ start: 60 }} />;
<View layout={{ flexDirection: "row", gap: 12, height: 24 }}>
<Text>Inbox</Text>
<Separator orientation="vertical" variant="thick" />
<Text>Archive</Text>
</View>;
States
Separator has no states. It takes no touches (isUserInteractionEnabled is off).
Props
Separator
| Prop | Type | Default | Description |
|---|---|---|---|
orientation |
"horizontal" | "vertical" |
"horizontal" |
Direction of the line. |
variant |
"thin" | "thick" |
"thin" |
One device pixel or one point. |
inset |
number | { start?: number; end?: number } |
0 |
Points kept clear at the ends. |
styles |
SeparatorStyles |
Style resolver for root. |
|
layout |
LayoutStyleProps |
Merged over the geometry, e.g. position: "absolute". |
Controller API
Separator has no value or commands, so it has no controller.
Styles
import { Separator, type SeparatorStyles } from "nitro-ui-sdk/separator";
const styles: SeparatorStyles = {
root: ({ tokens, variant }) => ({ style: { background: variant === "thick" ? tokens.colors.border : tokens.colors.separator } }),
};
<Separator variant="thick" styles={styles} />;
The single part is root. Resolvers receive { tokens, variant, size: "md", state } with state: { orientation; thickness: number; insetStart: number; insetEnd: number }; thickness is already resolved in points from the variant and the screen scale. Your style merges over the default, which carries the scale transform; avoid overriding its scaleX/scaleY/translateX/translateY keys.
Accessibility
Decorative: not an accessibility element, no label, never focused by VoiceOver.
Agent API
Read-only. Separator adds no agent entry.
Platform notes
| iOS | Android | |
|---|---|---|
| Hairline | The native LayoutMetrics.hairline service (ios/layout/HybridLayoutMetrics.swift) returns 1 / screen scale, read once per process; verified in the iOS harness. |
HybridLayoutMetrics.kt returns 1 / display density; written, compile-only on this machine. |
| Line | Composed View with a scale transform, because layout rounds to whole points. |
Same composed view. |