<Divider />
<Divider />TailwindCSS ModulesProduction StableHigh-performance structural separator primitive engineered for multi-tier visual rhythm, strict DOM accessibility, and flexible label slotting. Renders semantic native rules or decorative boundaries with microsecond overhead.
npx coloxo add divider --style coloxo-cssimport { Divider } from '@coloxo/ui';@coloxo/uiBundle: 0.62 KBDesign Tokens:
01 / Visual architecture
1. Orientation & Axis Geometry
Horizontal and vertical planar partitioning conforming to rigid 1px hairline rendering.
orientation="horizontal"DEFAULT100% width
Below the rule
<Divider orientation="horizontal" spacing="default" />
orientation="vertical"Telemetry
Nodes (42)
Filters
auto / flex stretch · 20px hairline
<Divider orientation="vertical" />
Standard Spacing Cadences
Managed via the strict 8pt vertical rhythm system.
spacing="compact"Above
Below
spacing="default"DEFAULTAbove
Below
spacing="relaxed"Above
Below
02 / DOM architecture
2. Semantic vs Decorative A11Y Contract
Engineered screen-reader parity guaranteeing clean acoustic accessibility.
decorative={true}DEFAULTScreen readers read cleanly past the element without announcing boundaries.
<div role="none" aria-hidden="true" class="cx-divider" />
decorative={false}Screen reader vocalizes a separator / thematic break.
<hr class="cx-divider" /> → “Separator / Thematic Break”
03 / Inline label architecture
3. Inline Label Architecture
Symmetrical micro-flex layout with centered badge, chip, or typographic label. Label is restricted to orientation="horizontal" via discriminated union types.
Standard String Token
label="OR"Descriptive Flow Partition
Iconography & Badge Slot
label={<Badge />}TypeScript compile-time safety: DividerProps = HorizontalDividerProps | VerticalDividerProps. Configuring a label on vertical orientation is a type error.
04 / Sandbox workspace
4. Interactive Live Playground
Real-time dynamic prop testing harness and code generation engine.
Props inspector
string | ReactNode
<Divider label="OR"/>05 / Theme system
5. Enterprise Dark Theme Matrix
Validated contrast metrics on deep enterprise background token scales.
Toolbar separatorCluster-09
ACTIVEcolor: outline-variant @ ~30% alpha
Dark inset label partitionAA Large / AAA Graphical label contrast
06 / Application patterns
6. Application Compositions
Real-world enterprise assembly archetypes in operational layouts.
Composition A: SSO Gateway
Auth TemplateMulti-provider SSO partitioning external OpenID federations from internal directory authentication.
Composition B: Data Grid Filter Toolbar
Data WorkspaceDense operational toolbar hosting date range selectors, search input, vertical divider bounds, and export triggers.
Transactions
1,492,028
Avg Latency
14.2 ms
07 / Compliance & standards
7. A11Y & Screen Reader Contract
Conforming strictly to W3C ARIA Authoring Practices Guide (APG).
When decorative={false}, elements utilize an explicit role="separator" paired with aria-orientation to alert non-visual users of content boundaries.
All hairline borders leverage explicit 1px CSS geometry rather than outline rings, guaranteeing exact 0.00 cumulative layout shift during progressive SSR hydration.
Includes @media (forced-colors: active) mappings to Windows system colors CanvasText / ButtonBorder, preventing separators from disappearing.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| orientation | "horizontal" | "vertical" | horizontal | Axis. Labels are only allowed on horizontal. |
| spacing | "compact" | "default" | "relaxed" | default | Margin rhythm (8px / 16px / 32px). |
| decorative | boolean | true | When true, presentational only; when false, announced thematic break. |
| label | ReactNode | — | Centered label/badge slot (horizontal only; TypeScript-enforced). |
| inset | boolean | — | Inset the stroke from container edges. |
| subtle | boolean | — | Lower-contrast stroke for secondary partitions. |
| stretch | boolean | — | Vertical only: stretch to flex cross-axis instead of the default 20px hairline. |