Display@knitui/components
Separator
Separator renders a divider line — mirrors Mantine's Divider. Supports variant (solid/dashed/dotted), size (thickness), orientation (horizontal/vertical), and an optional label anchored left, center, or right.
import { Separator } from "@knitui/components";Playground
Loading playground…
<Separator
orientation="horizontal"
variant="solid"
size="xs"
/>Examples
Variants
Every line style (solid, dashed, dotted) shown side by side.
Loading example…
Sizes
All seven thickness levels from xxs to xxl.
Loading example…
Vertical
Vertical orientation — useful inside flex rows to divide sections.
Loading example…
With Label Center
Label centered over the line — the default labelPosition.
Loading example…
With Label Left
Label pinned to the left edge of the line.
Loading example…
With Label Right
Label pinned to the right edge of the line.
Loading example…
With Icon Label
Label accepts any ReactNode — here a small icon is embedded inline.
Loading example…
Matrix
Full variant × size matrix for visual regression.
Loading example…
Styles
Per-slot styles targets individual parts — here the line and the label.
Loading example…
Props
| Prop | Type | Default | Description |
|---|---|---|---|
disabled system | boolean | undefined | — | |
label | ReactNode | — | Optional text label rendered over a horizontal line. |
labelPosition | SeparatorLabelPosition | undefinedleft · center · right | — | Where the label sits along the horizontal line. |
orientation | SeparatorOrientation | undefinedhorizontal · vertical | horizontal | Whether the line runs horizontally or vertically. |
shadow system | "xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined | — | |
size system | SeparatorSize | undefinedxxs · xs · sm · md · lg · xl · xxl | xs | Thickness of the line — xxs→xxl or an explicit px number. |
styles system | SlotStyles<SeparatorStyles> | undefined | — | Per-slot style sugar — props spread onto the matching styled part. |
theme system | ThemeName | null | undefined | — | Applies a theme to this element |
variant system | SeparatorVariant | undefinedsolid · dashed · dotted | solid | Border style of the line. |
Style slots
Every part of Separator can be styled through the styles prop. Explicit props on the component always win over slot styles.
| Slot | Usage |
|---|---|
label | styles={{ label: { … } }} |
line | styles={{ line: { … } }} |
Accessibility & DOM props (2)
| Prop | Type |
|---|---|
key | Key | null | undefined |
ref | Ref<TamaguiElement> | undefined |
Plus 501 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.