Skip to Content
ARCUI

Divider

Horizontal or vertical ARCUI separator with token-driven geometry and optional horizontal label content.

Divider centralizes separator geometry, theme color, and optional inline label composition so applications do not repeat ad-hoc one-pixel View styles.

Usage

import { Divider } from "react-native-arc-ui";

<Divider />;

Horizontal is the default orientation, length defaults to "100%", and thickness/radius fall back to Divider tokens.

Horizontal

<Divider length="100%" thickness={1} />

A horizontal Divider may include label content:

<Divider label="OR" labelPosition="center" />

Logical positions are:

start | center | end
Example
ARCUI Divider horizontal and vertical orientations

Label content

Textual ReactNode content receives ARCUI divider typography, theme color, and central font scaling.

<Divider label="Optional" />

Custom non-text ReactNode content remains consumer-owned:

<Divider label={<Badge label="New" />} />

Empty textual content and boolean ReactNode sentinels behave like no label and do not create empty gaps.

Vertical

<Divider orientation="vertical" length={32} />

Vertical mode intentionally does not accept label or labelPosition. The public discriminated union models that invariant directly.

Geometry

<Divider
  length={160}
  thickness={2}
  radius={1}
/>
  • horizontal root: width = length, line height = thickness;
  • vertical root: height = length, line width = thickness.

Invalid runtime dimensions/radius degrade safely to Divider defaults.

Theme colors

<Divider colors={{ line: "rgba(255,255,255,0.15)" }} />

<Divider
  colors={{
    line: {
      dark: "rgba(255,255,255,0.15)",
      light: "rgba(0,0,0,0.12)",
    },
    label: "rgba(96,96,96,1)",
  }}
/>

Priority:

colors.line
-> colors.*.divider.line

Textual label color resolves independently from colors.label and then colors.*.divider.label tokens. Custom ReactNode label content keeps its own styling.

Native surface

Divider supports React 19 ref-as-prop and a normal root style. Native View props such as testID, accessibility props, and layout callbacks remain available.

Testing

Stable suffixes depend on orientation/content:

divider

divider-line                 // unlabeled line or vertical line
divider-line-start           // horizontal labeled divider
divider-line-end             // horizontal labeled divider
divider-label                // textual label
divider-label-content        // custom ReactNode label

For provider setup and react-native-arc-ui/testing, see Testing.

API Reference

Divider Base · variant 1

Also inherits: ViewProps

PropTypeDefaultDescription
ref?Ref<ComponentRef<typeof View>>—Ref to the Divider root layout container.
length?DimensionValue"100%"Length along the Divider's primary axis. horizontal -> width vertical -> height
thickness?number—Divider line thickness. Falls back to tokens.sizings.divider.thickness.
colors?Readonly<IDividerColors>—Per-instance ARCUI-owned color overrides.
radius?number—Line corner radius. Falls back to tokens.radius.divider.
style?StyleProp<ViewStyle>—Style applied to the Divider root layout container. Use colors.line to customize the line itself.
orientation?"horizontal"——
label?ReactNode—Optional content displayed inside the Divider. Textual content receives ARCUI typography, theme transitions, and font scaling automatically. Custom ReactNode content is rendered as provided.
labelPosition?TDividerLabelPosition"center"Label placement along the horizontal Divider. Uses logical start/end terminology so the public API does not encode physical left/right semantics.

Divider Base · variant 2

Also inherits: ViewProps

PropTypeDefaultDescription
ref?Ref<ComponentRef<typeof View>>—Ref to the Divider root layout container.
length?DimensionValue"100%"Length along the Divider's primary axis. horizontal -> width vertical -> height
thickness?number—Divider line thickness. Falls back to tokens.sizings.divider.thickness.
colors?Readonly<IDividerColors>—Per-instance ARCUI-owned color overrides.
radius?number—Line corner radius. Falls back to tokens.radius.divider.
style?StyleProp<ViewStyle>—Style applied to the Divider root layout container. Use colors.line to customize the line itself.
orientation"vertical"required—

Per-instance color slots: IDividerColors

PropTypeDefaultDescription
line?TThemeColor—Divider line color.
label?TThemeColor—ARCUI-owned textual label color. Consumer-provided custom ReactNode labels remain consumer-owned.

Generated from the ARCUI 2.0.0 TypeScript source snapshot. Native inherited props remain available through the referenced React Native surface.

Generated from the ARCUI 2.0.0 TypeScript source snapshot. Native inherited props remain available through the referenced React Native surface.

Motion

Divider has no semantic animation state. Theme-aware line/label colors interpolate with the ARCUI theme SharedValue; geometry changes remain ordinary React Native layout.

Performance

There is no component React state or timer. Static geometry is memoized where useful and color interpolation remains UI-thread visual work.

Accessibility

The line itself is decorative and is not exposed as accessible content. A textual/custom label may carry meaning through its own rendered content. Divider does not invent a separator role or generic announcement.

Theming

Relevant token areas include:

colors.*.divider
sizings.divider
radius.divider
typography.divider
typography.maxFontSizeMultiplier

Try it live

Open in Expo Snack ↗

On this page