Agriculture Design System
Beta
Design System for the Export Service

Divider with text

A horizontal rule used to visually separate content with a label.

View in FigmaView in StorybookView in Github
import { ... } from '@ag.ds-next/react/divider-with-text';

Usage

Divider with text components can be imported via the divider-with-text entrypoint in the @ag.ds-next/react package.

For example:

import { ... } from '@ag.ds-next/react/divider-with-text';

Props

DividerWithText Props
PropTypeDescription
aria-hidden?Booleanish
If true, the <hr> element only will be hidden from assistive technologies. Children elements will not inherit this property.
children?ReactNode
textAlign?"left" | "center"
Sets the horizontal alignment of the label on the divider.

Source

You can view the full source code for this package on Github.