Divider
Visual separator for content sections. Creates clear boundaries between different parts of your UI.
Installation
Import
import { Divider } from '@svelte-atoms/core/divider';Preset Configuration
Customize the divider appearance using presets
You can customize the default styles for Divider components by defining presets in your configuration:
Examples
Explore different divider variations
Horizontal Divider
Default horizontal separator
Content above
Content below
Code
<Divider />
Vertical Divider
Vertical separator for inline content
Item 1 Item 2 Item 3
Code
<Divider orientation="horizontal" /> <Divider orientation="vertical" />
Divider with Label
Divider containing text or content
OR
Code
<Divider> <span>OR</span> </Divider>
API Reference
Divider Props
Prop
Type
Default
Description
vertical
boolean | undefined
false
Vertical
transparent
boolean | undefined
false
Transparent
...atomProps
HtmlAtomProps
-
All HTML element props are supported. See [Atom Props](/docs/components/atom#props) for the complete list of inherited properties.
Accessibility
Built-in Accessibility Features
- • Semantic hr element for horizontal dividers
- • Proper ARIA role when needed
- • Sufficient visual contrast
- • Does not interfere with screen readers
- • Decorative element properly marked