Invisible block that adds white space
| Prop | Type | Description |
|---|---|---|
| top? | number | Top margin in rems |
| bottom? | number | Bottom margin in rems |
| children? | React.Node | Accpets children to render |
| left? | number | Left margin in rems |
import { Spacer } from "@brick-uikit/layout";The Spacer component is a simple utility for controlling spacing between elements. You can use it to apply top, bottom, or left margins in rem units. It also accepts children to render inline content with spacing applied. This makes layout adjustments quick and consistent without manually writing margin styles for each element
Some content below the buttons
This text is indented using left marginexample.tsx
<h3>Example of spacer</h3>
<Spacer top={2}/>
<Button>Button 1</Button>
<Spacer bottom={3}/>
<p>Some content below the buttons</p>
<Spacer left={4}>This text is indented using left margin</Spacer>