Spacer
pivot-spacer is a utility component for creating consistent vertical spacing between content sections. It provides a full-width, non-semantic spacing element that respects the design system’s spacing scale.
Quick Start
<!-- Default spacer (16px/1rem) -->
<pivot-spacer></pivot-spacer>
<!-- Small spacer (8px/0.5rem) -->
<pivot-spacer pivot-height="8"></pivot-spacer>
<!-- Large spacer (40px/2.5rem) -->
<pivot-spacer pivot-height="40"></pivot-spacer>
<!-- Extra large spacer (80px/5rem) -->
<pivot-spacer pivot-height="80"></pivot-spacer>Choosing a Height
pivot-height accepts a fixed set of numeric values — 2, 4, 8, 12, 16, 20, 24, 28, 32, 40, 48, 60, 64, 80 — each mapped to a design-system spacing token. Only these values have a matching CSS rule; setting pivot-height to any other number silently falls through to the default height (16 / 1rem) instead of erroring or warning, since no CSS selector matches an unsupported value.
Accessibility
pivot-spacer is purely presentational. It renders a single, empty <div aria-hidden="true"> with no accessible name and no text content.
Screen Reader Behavior
The rendered <div> carries aria-hidden="true", explicitly removing it from the accessibility tree — screen readers skip it outright rather than relying on default browser/AT handling of empty, non-semantic elements. Combined with having no role, no accessible name, and no content, pivot-spacer is never announced.
Keyboard Navigation
The component sets no tabindex and attaches no keyboard event listeners. It is never part of the tab order (WCAG 2.1.1 does not apply — there is no interactive behavior to operate).
Focus Management
pivot-spacer never calls .focus()/.blur(). PivotBase sets delegatesFocus: true on the shadow root, but the spacer’s shadow DOM contains no focusable content for focus to delegate to, so this has no practical effect. The component does not otherwise participate in focus management.
References
API Reference
Props
| Name | Type | Default | Description |
|---|---|---|---|
pivot-height |
PivotHeight |
16 |
Number property for the height of the spacer |
CSS Custom Properties
| Name | Description |
|---|---|
--pivot-space-3xs |
Block size (height) of the spacer when `pivot-height="2"`. Default: 0.125rem. |
--pivot-space-2xs |
Block size (height) of the spacer when `pivot-height="4"`. Default: 0.25rem. |
--pivot-space-xs |
Block size (height) of the spacer when `pivot-height="8"`. Default: 0.5rem. |
--pivot-space-sm |
Block size (height) of the spacer when `pivot-height="12"`. Default: 0.75rem. |
--pivot-space-md |
Block size (height) of the spacer when `pivot-height="16"` (the default). Default: 1rem. |
--pivot-space-lg |
Block size (height) of the spacer when `pivot-height="20"`. Default: 1.25rem. |
--pivot-space-xl |
Block size (height) of the spacer when `pivot-height="24"`. Default: 1.5rem. |
--pivot-space-2xl |
Block size (height) of the spacer when `pivot-height="28"`. Default: 1.75rem. |
--pivot-space-3xl |
Block size (height) of the spacer when `pivot-height="32"`. Default: 2rem. |
--pivot-space-4xl |
Block size (height) of the spacer when `pivot-height="40"`. Default: 2.5rem. |
--pivot-space-5xl |
Block size (height) of the spacer when `pivot-height="48"`. Default: 3rem. |
--pivot-space-6xl |
Block size (height) of the spacer when `pivot-height="60"`. Default: 3.75rem. |
--pivot-space-7xl |
Block size (height) of the spacer when `pivot-height="64"`. Default: 4rem. |
--pivot-space-8xl |
Block size (height) of the spacer when `pivot-height="80"`. Default: 5rem. |
All height variants
<pivot-spacer pivot-height="2"></pivot-spacer>
<pivot-spacer pivot-height="4"></pivot-spacer>
<pivot-spacer pivot-height="8"></pivot-spacer>
<pivot-spacer pivot-height="12"></pivot-spacer>
<pivot-spacer pivot-height="16"></pivot-spacer>
<pivot-spacer pivot-height="20"></pivot-spacer>
<pivot-spacer pivot-height="24"></pivot-spacer>
<pivot-spacer pivot-height="28"></pivot-spacer>
<pivot-spacer pivot-height="32"></pivot-spacer>
<pivot-spacer pivot-height="40"></pivot-spacer>
<pivot-spacer pivot-height="48"></pivot-spacer>
<pivot-spacer pivot-height="60"></pivot-spacer>
<pivot-spacer pivot-height="64"></pivot-spacer>
<pivot-spacer pivot-height="80"></pivot-spacer>Unsupported height value falls back to default (pivot-height)
pivot-height only has matching CSS for the 14 values shown above. Any other number — like 100 here — has no matching selector, so the spacer silently renders at the default height (16 / 1rem) instead of erroring or collapsing to zero.
<pivot-spacer pivot-height="16"></pivot-spacer>
<pivot-spacer pivot-height="100"></pivot-spacer>