Spacer

Layout & Structure
stable

Flex spacer that grows to fill available space inside a flex row or column, pushing siblings apart.

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamSpacerSchematic of the Spacer component with 1 numbered part inside a flex container. flex container (e.g. origam-toolbar / origam-row) sibling origam-spacer (flex-grow: 1) sibling 1
Anatomy of <origam-spacer> — a single element that grows to fill all remaining space in a flex container.
1.origam-spacer
Root element. flex-grow: 1 (driven by --origam-spacer---flex-grow). No visual surface by default — purely a layout utility.

API

Props

All props accepted by this component, with their type, default value and description.

id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'div'
HTML element rendered at the root. Defaults to div.

API

Slots

Content slots exposed by this component.

#default
Optional content rendered inside the spacer element.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to a child component.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document. Called automatically on mount.
() => void
Removes the injected style sheet. Called automatically on unmount.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Controls how greedily the spacer grows inside a flex container. Default is 1 (fill all remaining space).

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

Notes

  • Spacer is a purely presentational layout element with no semantic role. Screen readers skip it entirely. No ARIA attributes are needed.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Basic usage — push apart in a toolbar

vue

Usage inside a Row

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.