Stack
<Stack /> is a wrapper component that adds margins between child components using this hack:
/* adds margin between all immediate child elements that are adjacent */.stack > * + * { margin-top: 1.5rem;}Also inspired by Chakra UI.
import { Stack } from 'minerva-ui';Usage
Item 1
Item 2
Item 3
Horizontal Stack
Item 1
Item 2
Item 3
Custom Gap
Item 1
Item 2
Item 3
Props
These are props related to the Stack component.
| Name | Type | Is Required | Default | Description |
|---|---|---|---|---|
gap | string | optional | 10px | Space between items in stack |
horizontal | boolean | optional | false | Change stack direction to horizontal |