Knit UI
GitHub

Playground

Loading playground…

Playground
<Separator
  orientation="horizontal"
  variant="solid"
  size="xs"
/>

Examples

Variants

Every line style (solid, dashed, dotted) shown side by side.

Loading example…

VariantsSourceStorybook

Sizes

All seven thickness levels from xxs to xxl.

Loading example…

SizesSourceStorybook

Vertical

Vertical orientation — useful inside flex rows to divide sections.

Loading example…

VerticalSourceStorybook

With Label Center

Label centered over the line — the default labelPosition.

Loading example…

With Label CenterSourceStorybook

With Label Left

Label pinned to the left edge of the line.

Loading example…

With Label LeftSourceStorybook

With Label Right

Label pinned to the right edge of the line.

Loading example…

With Label RightSourceStorybook

With Icon Label

Label accepts any ReactNode — here a small icon is embedded inline.

Loading example…

With Icon LabelSourceStorybook

Matrix

Full variant × size matrix for visual regression.

Loading example…

MatrixSourceStorybook

Styles

Per-slot styles targets individual parts — here the line and the label.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
disabled systemboolean | undefined
labelReactNodeOptional text label rendered over a horizontal line.
labelPositionSeparatorLabelPosition | undefined
left · center · right
Where the label sits along the horizontal line.
orientationSeparatorOrientation | undefined
horizontal · vertical
horizontalWhether the line runs horizontally or vertically.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
size systemSeparatorSize | undefined
xxs · xs · sm · md · lg · xl · xxl
xsThickness of the line — xxs→xxl or an explicit px number.
styles systemSlotStyles<SeparatorStyles> | undefinedPer-slot style sugar — props spread onto the matching styled part.
theme systemThemeName | null | undefinedApplies a theme to this element
variant systemSeparatorVariant | undefined
solid · dashed · dotted
solidBorder 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.

SlotUsage
labelstyles={{ label: { … } }}
linestyles={{ line: { … } }}
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<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.