Flex spacer that grows to fill remaining space in a flex container.
Drop a <.spacer /> between two items in a flex row/column to push the
trailing item to the far end — equivalent to margin-left: auto patterns.
Examples
<%!-- Push actions to the right in a toolbar --%>
<div class="flex items-center">
<span>Title</span>
<.spacer />
<.button>Action</.button>
</div>
<%!-- Fixed-size gap --%>
<div class="flex flex-col">
<p>Top</p>
<.spacer size={:md} />
<p>Below with fixed gap</p>
</div>
Summary
Functions
Renders a flex spacer element.
Functions
Renders a flex spacer element.
Attributes
size(:atom) -autogrows to fill remaining flex space; others add a fixed dimension. Defaults to:auto. Must be one of:auto,:xs,:sm,:md,:lg, or:xl.class(:string) - Additional CSS classes merged via cn/1. Defaults tonil.- Global attributes are accepted. HTML attributes forwarded to the root element.