Stack

A vertical flex container. Sets the gap from the spacing token scale and can render dividers between children.

Usage

<script>
  import { Stack } from '@vultra/ui';
</script>

<Stack gap={2}>
  <p>First</p>
  <p>Second</p>
</Stack>

<Stack gap={1} divider>
  <p>Divided</p>
  <p>Rows</p>
</Stack>

Props

PropTypeDefaultDescription
gapnumber4Gap from the spacing token scale
dividerbooleanfalseRender a border between children
classstringAdditional CSS classes
childrenSnippetStack content

Features

  • Single-axis vertical layout.
  • Gap restricted to the spacing token scale.
  • divider adds hairline separators with the border token.