Divider
Divider separates content with a horizontal or vertical line. Supports text labels and colors.
Basic Example
Divider with text and colors
const { default: Divider } = await import('/components/layout/divider.js');
const { tags, $ } = Lightview;
const { div } = 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')
);
$('#demo').insert(demo);
Props
| Prop | Type | Default | Description |
|---|---|---|---|
horizontal |
boolean | false | Vertical divider (use in flex row) |
color |
string | - | 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' |
Without Text
Content
Content
Vertical
Left
OR
Right
Colors
Primary
Secondary
Accent
Success
Warning
Error
For more examples, see the
DaisyUI Divider documentation.