Skip to content
iv-ui v0.3.0

Separator

since 0.1.0

A hairline rule that separates content.

import { Separator } from '@elluzion/iv-ui';

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>
  • orientation="vertical" needs a parent with a defined height.
  • Add label for a centered caption on a horizontal rule.
  • spacing controls the margin around the line.

Labeled

A centered caption splits the line into two segments.

Read access is inherited from the organization.

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>
import { Separator } from '@elluzion/iv-ui';

Props

4 props · 0 events · 0 snippets
PropTypeDefaultDescription
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.

  • 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.
Class hooks
.iv-horizontal.iv-label-text.iv-labeled.iv-line.iv-separator.iv-spacing-lg.iv-spacing-sm.iv-vertical
iv-ui
↑ ↓ navigate ↵ open esc close minisearch · 482 records