Divider Examples
The examples below assume that you have imported the component and set up the theme.
Basic
Separate two blocks of content with a horizontal line. A bare sv-divider between the blocks draws the line and has the separator role.
The label that the controls add also names the separator.
Sign in with your email and password.
Or sign in with a passkey.
<div class="divider-basic"> <p>Sign in with your email and password.</p> <sv-divider></sv-divider> <p>Or sign in with a passkey.</p></div>
<style> .divider-basic { display: grid;
p { margin: 0; }
sv-divider { margin-block: 1em; }
svg { display: block; inline-size: 1.25em; fill: currentcolor; } }</style>Vertical
Separate items in a row, like groups of toolbar buttons or links in a line of text. vertical turns the line upright, to the height of a flex row or one line of text.
Home
<div class="divider-vertical"> <figure> <div class="divider-vertical-toolbar"> <button type="button" class="btn">Bold</button> <button type="button" class="btn">Italic</button> <sv-divider vertical></sv-divider> <button type="button" class="btn">Link</button> </div> <figcaption>Flex row</figcaption> </figure>
<figure> <p> Home <sv-divider vertical></sv-divider> Docs <sv-divider vertical></sv-divider> Blog </p> <figcaption>Inline text</figcaption> </figure></div>
<style> .divider-vertical { display: grid; gap: 2em; justify-items: center;
figure { display: grid; gap: 0.75rem; justify-items: center; margin: 0; }
figcaption { font-size: 0.8rem; color: var(--sv-gray-3); }
p { margin: 0;
sv-divider { margin-inline: 0.5em; } } }
.divider-vertical-toolbar { display: flex; gap: 0.5em; }</style>