Divider
A visual separator used to divide content sections or list items.
Import
tsx
import { Divider } from '@tac-ui/native';Playground
Interactively configure the Divider props below.
tsx
<Divider variant="full" orientation="horizontal" />Full
The default variant spans the full width of its container as a 1px horizontal rule.
tsx
<Divider />Inset
The inset variant adds horizontal margins on both sides, commonly used inside list items or cards.
tsx
<Divider variant="inset" />Thick
The thick variant renders a 2px rule for stronger visual separation between major sections.
tsx
<Divider variant="thick" />With Label
Pass a label string to render centered text between two rule lines, useful for separating form sections or login options.
OR
Continue with
tsx
<Divider variant="withLabel" label="OR" />
<Divider variant="withLabel" label="Continue with" />Vertical Orientation
Set orientation to vertical to create a vertical separator, useful inside HStack or row layouts.
HomeAboutContact
tsx
<HStack gap="md" style={{ height: 40 }}>
<Text>Home</Text>
<Divider orientation="vertical" />
<Text>About</Text>
<Divider orientation="vertical" />
<Text>Contact</Text>
</HStack>API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "full" | "inset" | "thick" | "withLabel" | "full" | Visual style variant of the divider. |
| orientation | "horizontal" | "vertical" | "horizontal" | Orientation of the divider line. |
| label | string | - | Text label rendered in the center of the divider; implies withLabel layout. |
| style | ViewStyle | - | Additional React Native style applied to the divider container. |