Hone UI
Components

Divider

A thin line between pieces of content.

Divider separates content with a line. It can carry text in the middle and run vertically. It is a Server Component.

import Divider from '@hone-ui/react/Divider';

Examples



<Divider />
<Divider variant="middle" />
<Divider>OR</Divider>
<Divider textAlign="left">Section</Divider>

Props

PropTypeDefaultDescription
orientation'horizontal', 'vertical''horizontal'The direction of the line.
variant'fullWidth', 'inset', 'middle''fullWidth'The span of the line.
flexItembooleanfalseStretches a vertical divider in a flex row.
absolutebooleanfalsePins it to the bottom of a positioned parent.
textAlign'center', 'left', 'right''center'Where the text sits.
componentElementType'hr' or 'div'The element to render.
sx, className, style, ref, childrenStandard. Children go in the middle of the line.

Notes

  • light is not supported. Set a color through sx instead.
  • Divider does not read components.Divider.defaultProps, because it stays a Server Component.

Accessibility

An hr is a separator by itself. Other elements get role="separator", and vertical ones aria-orientation="vertical".

On this page