Skip to content

Stack

import { Stack } from 'yarcl';
gap="xs"123
gap="md"123
gap="xl"123
<Stack gap="md">
<Heading level={2}>Profile</Heading>
<Field label="Name"><Input /></Field>
</Stack>

gap accepts the keys of your spacing and defaults to defaults.gap. Use as to render a semantic element (section, form, ul, nav …); list styles are reset.

Accepts every native <div> attribute.

PropTypeDefaultDescription
alignAlignCross-axis alignment of children.
asLayoutElement'div'Element to render.
gapSpacingconfigconfig.defaults.gapSpace between children, from the spacing config.
justifyJustifyMain-axis distribution of children.