Fidely UI v1 beta is now available!. 🚀

Stack

Used to layout its children in a vertical or horizontal stack.

Usage

import { HStack, Stack, VStack } from '@fidely-ui/react'
<Stack>
  <div />
  <div />
</Stack>

Examples

HStack

Alternatively, you can use the HStack to create a horizontal stack and align its children horizontally.

<HStack>
  <Box height={'50px'} />
  <Box height={'50px'} />
  <Box height={'50px'} />
  <Box height={'50px'} />
</HStack>

VStack

Use the VStack to create a vertical stack and align its children vertically.

<VStack>
  <Box height={'50px'} />
  <Box height={'50px'} />
  <Box height={'50px'} />
  <Box height={'50px'} />
</VStack>

Responsive Direction

Use the direction prop to change the direction of the stack responsively.

<Stack direction={{ base: 'column', md: 'row' }} gap="6">
  <Box boxSize="25" />
  <Box boxSize="25" />
  <Box boxSize="25" />
</Stack>

On this page