rslabdocs

Divider

A horizontal or vertical divider line, with an optional centered label.

ReanimatedNativeWindSource

Prerequisites

Just Reanimated, for a quiet one-off fade-in on mount.


npx expo install react-native-reanimated

Install


npx @rslab/cli add divider

Usage


import { Divider } from '@/components/ui/Divider';



<Divider />

<Divider label="OR" />

Vertical dividers need an explicit height from their parent, since h-full only fills a sized container:

<View className="flex-row items-center">
  <Button variant="outline">Cancel</Button>

  <Divider orientation="vertical" className="mx-4 h-11" />

  <Button>Confirm</Button>
</View>

Props

PropTypeDefault
label?
string
-

Optional text centered between two line segments. Ignored when orientation is "vertical".

orientation?
'horizontal''vertical'
'horizontal'
color?
string
-

Override the line color for both segments. Skips the default neutral theme color entirely.

className?
string
-

Extend or override the outer container.

See exactly how this works with an RSLAB subscription.

Get Pro

On this page