Line divider
Separates groups of content with a horizontal rule, optionally labeled.
Default
A one-pixel rule across the container.
<.line_divider />
With text
The label sits in the middle with the line on both sides.
or
<.line_divider text="or" />
Between groups
Separates groups of actions, as in a menu.
<.button label="Project settings" variant="secondary" />
<.button label="Members" variant="secondary" />
<.line_divider />
<.button label="Delete project" variant="destructive" />
Between options
Separates two ways to do the same thing.
or
<.button label="Continue with GitHub" variant="secondary" />
<.line_divider text="or" />
<.button label="Continue with email" variant="secondary" />
Guidelines
- Use a divider between groups of related items, such as sections of a menu or entries in a list, not between every item.
- The divider spans the full width of its container. Wrap it or the surrounding content to control its length.
-
Add
textto label the break, such as or between two ways to sign in. The line splits around the label. - For a label without a line, use the text divider.
API reference
<.line_divider>
| Attribute | Type | Default | Description |
|---|---|---|---|
|
text
|
string
|
nil
|
The text to display in the line divider
|
Also accepts global attributes.