Spacer
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.
<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.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- tagstring'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
Usage inside a Row
Ecosystem
Family
Components from the same folder that share conventions and often compose together.