Divider separates content with a horizontal or vertical line. Supports text labels and colors.
Basic Example
Divider with text and colors
await import('/components/layout/divider.js');
const { tags, $ } = Lightview;
const { div, Divider } = tags;
const demo = div({ class: 'flex flex-col w-full' },
div({ class: 'card bg-base-300 p-4 rounded-box' }, 'Content above'),
Divider({}, 'OR'),
div({ class: 'card bg-base-300 p-4 rounded-box' }, 'Content below'),
Divider({ color: 'primary' }, 'Primary'),
div({ class: 'card bg-base-300 p-4 rounded-box' }, 'More content')
);
$('#example').content(demo);
Props
| Prop | Type | Default | Description |
|---|---|---|---|
horizontal |
boolean | false | Vertical divider (use in flex row) |
color |
string | - | 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' |
Divider Gallery
Live examples using <lv-divider> custom elements.
Basic Divider
Content
Content
With Text
Login
Sign Up
Horizontal (Manual)
Left
Right