Divider
Separate related content with a theme-aware rule.
Overview
Divider renders an empty horizontal or vertical rule that separates related content. It is a static separator, not a labelled divider or a resizable panel handle.
Use when
A visible rule helps separate adjacent content; use its semantic separator role only when the boundary is not already conveyed by headings or other structure.
Use instead
Use gap or padding when no visible rule is needed. Use headings to establish hierarchy, and make an accompanying Divider decorative. Use a resizable splitter when people must resize panels.
Usage
Deployment
Production is healthy.
Billing
import { Divider, Heading, Stack, Text } from "@smoothie-framework/whisk-react";
<Stack gap={3}>
<Heading level={4} size="sm">Deployment</Heading>
<Text color="subtle">Production is healthy.</Text>
<Divider decorative />
<Heading level={4} size="sm">Billing</Heading>
</Stack>Examples
Sections
When headings already identify the groups, use a decorative horizontal Divider for the visible boundary. Keep ordinary spacing in the parent Stack.
Workspace settings
Manage shared defaults for your team.
Notification settings
Choose when the team receives updates.
import { Divider, Heading, Stack, Text } from "@smoothie-framework/whisk-react";
<Stack gap={3}>
<Stack gap={1}>
<Heading level={4} size="sm">Workspace settings</Heading>
<Text color="subtle">Manage shared defaults for your team.</Text>
</Stack>
<Divider decorative />
<Stack gap={1}>
<Heading level={4} size="sm">Notification settings</Heading>
<Text color="subtle">Choose when the team receives updates.</Text>
</Stack>
</Stack>Row
A vertical Divider needs a parent with a definite height. Use it for a meaningful boundary between control groups, not as a substitute for gap.
import { Box, Button, Divider, StackRow } from "@smoothie-framework/whisk-react";
<Box height={12}>
<StackRow height="full" align="center" gap={3}>
<Button variant="secondary">Preview</Button>
<Button variant="secondary">Share</Button>
<Divider orientation="vertical" />
<Button>Publish</Button>
</StackRow>
</Box>Variants
Use a named size and semantic color when the division needs more visual weight. Use custom values only when your theme needs a value outside the built-in scale.
Review complete
Ready to publish
import { Divider, Stack, Text } from "@smoothie-framework/whisk-react";
<Stack gap={3}>
<Text>Review complete</Text>
<Divider variant="dashed" size="md" color="accent" decorative />
<Text>Ready to publish</Text>
</Stack>Labelled break
Divider cannot contain children. When a break needs a visible label, place ordinary text between two decorative rules.
Earlier activity
import { Box, Divider, StackRow, Text } from "@smoothie-framework/whisk-react";
<StackRow align="center" gap={2}>
<Box grow={1}><Divider decorative /></Box>
<Text textAlign="center" color="subtle">Earlier activity</Text>
<Box grow={1}><Divider decorative /></Box>
</StackRow>Props
Component props
Shared props
Accessibility
By default, Divider renders role="separator" with an explicit aria-orientation, so use it only when the boundary is not already conveyed by headings or other structure. Set decorative for a purely visual rule. Divider cannot carry a visible label or receive focus; use ordinary text with decorative lines for a labelled break, and a dedicated splitter component for user-resizable panels.