Layout
Spacer
An empty element that takes space in a flex row or column: without a size it grows to fill what is left, pushing the next items to the other end; with a size it is a fixed gap.
The brand at the start of the header and the light/dark toggle pushed to the end: the spacer grows (flex-1) to fill the space between them.
A fixed gap #
A square gap, 1.5rem on each side at lg, between the two buttons, in a row that has no gap of its own.
Nothing to show
Fixed sizes #
With size it is a fixed square gap instead, from xs to 3xl, in a row with no gap of its own.
Nothing to show
In a column #
In a flex column the spacer grows vertically, keeping the footer of a card at the bottom.
Starter
Business
Nothing to show
Size from state #
The size is a plain prop, so it can follow Livewire state: switch to compact to shrink the gap.
Nothing to show
Customization #
Classes and attributes go to the <div>. Here the spacer is hidden on small screens, so the items sit together there.
Nothing to show
Reference
tk:spacer
| Prop | Type | Default | Description |
|---|---|---|---|
size |
string | grows | A fixed square gap: xs, sm, md, lg, xl, 2xl or 3xl. Without it the spacer fills the remaining space. |
Customization
Classes and attributes go to the <div>.
Nothing to show
Accessibility
Hidden from screen readers (aria-hidden="true").