Separator

Separators are used to visually separate content in a list or group.

Source@chakra-ui/layout

Import#

import { Separator } from '@chakra-ui/react'

Usage#

The Separator displays a thin horizontal or vertical line, and renders an hr tag.

<Separator />

Changing the orientation#

Pass the orientation prop and set it to either horizontal or vertical.

<Separator orientation='horizontal' />

If the vertical orientation is used, make sure that the parent element is assigned a height.

<Center height='50px'>
<Separator orientation='vertical' />
</Center>

Adding content within the separator#

In some cases, you might want to add content within a Separator. To do this, you can compose the Separator and AbsoluteCenter components.

<Box position='relative' padding='10'>
<Separator />
<AbsoluteCenter bg='white' px='4'>
Content
</AbsoluteCenter>
</Box>
Edit this page on GitHub

Proudly made inNigeria by Segun Adebayo

Deployed by â–² Vercel