Anatomy
- Spacer: A container that provides spacing to a wrapped content
- Content: An element/component that requires spacing around itself
Usage Guidelines
When to use this component
- To add spacing around a single item.
When not to use this component
Best Practices
Use Spacer to add margins around one element—values map to the spacing scale.
Be cautious of margin collapse on vertical siblings. If you need consistent spacing between multiple items, use Stack instead.
General Component Behaviors
Width
Spacer acts as a block element and will take 100% width, unless specified differently by a parent (e.g. Flexbox with specified alignment).