Separator
A hairline rule that separates content.
import { Separator } from '@elluzion/iv-ui'; 01 Preview
Horizontal
The default rule between stacked blocks.
Build finished in 42 seconds.
Deploy started from the release branch.
Source· svelte Show Hide
<script lang="ts">
import { Separator } from '@elluzion/iv-ui';
</script>
<div class="stack">
<p>Build finished in 42 seconds.</p>
<Separator />
<p>Deploy started from the release branch.</p>
</div>
<style>
.stack {
width: 100%;
p {
margin: 0;
font-family: var(--iv_font-ui);
font-size: var(--iv_text-body);
color: var(--iv_foreground-dim);
}
}
</style>02 Usage
orientation="vertical"needs a parent with a defined height.- Add
labelfor a centered caption on a horizontal rule. spacingcontrols the margin around the line.
03 Examples
Labeled
A centered caption splits the line into two segments.
Read access is inherited from the organization.
Write access
Members listed below can deploy and roll back.
Source· svelte Show Hide
<script lang="ts">
import { Separator } from '@elluzion/iv-ui';
</script>
<div class="stack">
<p>Read access is inherited from the organization.</p>
<Separator label="Write access" />
<p>Members listed below can deploy and roll back.</p>
</div>
<style>
.stack {
width: 100%;
p {
margin: 0;
font-family: var(--iv_font-ui);
font-size: var(--iv_text-body);
color: var(--iv_foreground-dim);
}
}
</style>Vertical
A vertical rule between inline items; the row provides the height.
Build42s
Tests118
Size84 kB
Source· svelte Show Hide
<script lang="ts">
import { Separator } from '@elluzion/iv-ui';
</script>
<div class="row">
<div class="cell"><span class="label">Build</span><span class="value">42s</span></div>
<Separator orientation="vertical" />
<div class="cell"><span class="label">Tests</span><span class="value">118</span></div>
<Separator orientation="vertical" />
<div class="cell"><span class="label">Size</span><span class="value">84 kB</span></div>
</div>
<style>
.row {
display: flex;
align-items: stretch;
padding: var(--iv_spacing-md) 0;
width: 100%;
max-width: 420px;
}
.cell {
display: flex;
flex-direction: column;
gap: var(--iv_spacing-2xs);
flex: 1;
}
.label {
font-family: var(--iv_font-mono);
font-size: var(--iv_text-xs);
color: var(--iv_foreground-dim);
text-transform: uppercase;
letter-spacing: var(--iv_tracking-wide);
}
.value {
font-family: var(--iv_font-mono);
font-size: var(--iv_text-lg);
color: var(--iv_foreground);
}
</style>04 API
import { Separator } from '@elluzion/iv-ui';Props
4 props · 0 events · 0 snippets| Prop | Type | Default | Description |
|---|---|---|---|
| orientation | 'horizontal' | 'vertical' | 'horizontal' | Line direction. |
| label | string | '' | Optional text rendered in the middle of the line. |
| spacing | 'sm' | 'md' | 'lg' | 'md' | Vertical margin around the line. |
| className | string | '' | Extra classes merged onto the root element. |
class, id, style, aria-*, and data-* are forwarded through rest props.
05 Accessibility
- The element exposes
role="separator"with the matching orientation. - The label is visual text; it is not part of the accessible name.
- Decorative line segments are hidden from assistive technology.
06 Tokens & CSS hooks
Tokens used
Class hooks
.iv-horizontal.iv-label-text.iv-labeled.iv-line.iv-separator.iv-spacing-lg.iv-spacing-sm.iv-vertical