VStack
VStack
is used to stack child elements vertically.
Box
Box
Box
Box
<VStack>
{Array.from({ length: 4 }).map((_, index) => (
<Box key={index} bg="bg.contrast" color="fg.contrast" p="md">
Box
</Box>
))}
</VStack>
Usage
import { VStack } from "@yamada-ui/react"
import { VStack } from "@/components/ui"
import { VStack } from "@workspaces/ui"
<VStack />
Adding Separators Between Child Elements
Use the separator
prop to add a separator between the child elements.
Box
Box
Box
Box
<VStack separator={<Separator />}>
{Array.from({ length: 4 }).map((_, index) => (
<Box key={index} bg="bg.contrast" color="fg.contrast" p="md">
Box
</Box>
))}
</VStack>