Spacer

Invisible block that adds white space

PropTypeDescription
top?numberTop margin in rems
bottom?numberBottom margin in rems
children?React.NodeAccpets children to render
left?numberLeft margin in rems
language icon
copy icon
import { Spacer } from "@brick-uikit/layout";

Usage spacer

Spacer

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

Example of spacer

Spacer top and bottom

Some content below the buttons

This text is indented using left margin
language icon

example.tsx

copy icon
<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>