Separator
Separator is a component that represents a division between elements.
<Separator />
Usage
import { Separator } from "@yamada-ui/react"
import { Separator } from "@/components/ui"
import { Separator } from "@workspaces/ui"
<Separator />
Change Variant
<VStack>
<For each={["solid", "dashed", "dotted"]}>
{(variant, index) => <Separator key={index} variant={variant} />}
</For>
</VStack>
Change Size
<VStack>
<For each={["xs", "sm", "md", "lg"]}>
{(size, index) => <Separator key={index} size={size} />}
</For>
</VStack>
Change Color
To change the color, set borderColor.
<VStack>
<Separator borderColor="success" />
<Separator borderColor="warning" />
</VStack>
Vertical
First
Second
<HStack>
<Text>First</Text>
<Separator orientation="vertical" h="4" />
<Text>Second</Text>
</HStack>
Label
Label
Label
Label
<VStack>
<HStack>
<Text flexShrink="0">Label</Text>
<Separator flex="1" />
</HStack>
<HStack>
<Separator flex="1" />
<Text flexShrink="0">Label</Text>
</HStack>
<HStack>
<Separator flex="1" />
<Text flexShrink="0">Label</Text>
<Separator flex="1" />
</HStack>
</VStack>
Props
Similar Components
ZStack
ZStack is used to stack child elements in depth.
VStack
VStack is used to stack child elements vertically.
Wrap
Wrap is a component that has wrap set on Flex. It inherits convenient style shorthand from Flex.
Stack
Stack is a component that groups elements and provides spacing between child elements.
Spacer
Spacer is a component used to add space between elements.
SimpleGrid
SimpleGrid is a component that makes Grid simpler and more user-friendly.
Group
Group is a component that groups and attaches multiple elements together.
HStack
HStack is used to stack child elements horizontally.