Spacer
Spacer creates space between elements. Without a size, it grows to fill available flex space. With a size, it adds a fixed gap.
Basic Usage
Left
Right
import { Spacer } from "@paramanu/primitives-react"
export default function App() {return ( <div style={{ display: "flex" }}> <div>Left</div> <Spacer /> <div>Right</div> </div>)}<div style="display: flex; border: 1px dashed #ccc; height: 50px; align-items: center;"><div>Left</div><div class="pm-spacer" aria-hidden="true"></div><div>Right</div></div>React Props
| Prop | Type | Default | Description |
|---|---|---|---|
size | SpacingScale | — | Fixed size. Without this, spacer grows. |
axis | "horizontal" | "vertical" | — | Direction |
CSS Classes
| Class | Purpose |
|---|---|
pm-spacer | Base (flex: 1) |
pm-spacer--size-{scale} | Fixed size |
pm-spacer--horizontal | Horizontal |
pm-spacer--vertical | Vertical |