React

Divider

A component that serves as a visual divider and is used to clearly separate sections between content.

Available since@seed-design/react@0.0.14, @seed-design/css@0.0.14

Props

Prop

Type

Usage

import { Divider } from "@seed-design/react";
<Divider />

Screen Reader Behavior

Divider renders <hr /> by default. <hr /> is a semantic divider, and screen readers also read the element as "horizontal (vertical) line".

If Divider is a decorative element without semantic meaning, use the as prop to render it as a <div> or similar so screen readers do not read the element.

Conversely, when Divider must be rendered as an element other than <hr /> such as <li>, if screen readers should read the element, you must explicitly specify role="separator".

Examples

Orientation

Inset

Table of contents