packages/react-components/react-divider/library/docs/Spec.md
A Divider is used to visually segment content into groups.
Github Epic Convergence Issue #16254
Github Convergence Issue #15759
Basic Examples:
<Divider />
<Divider vertical />
<Divider>This is a divider with content</Divider>
The Divider component has two layout variants:
Divider is separates contents by rendering a horizontal line.Divider with the vertical prop set to true separates contents by rendering a vertical line.A Divider with the inset prop adds padding to the beginning and end of the component.
The Divider component has four appearance variants:
Divider is styled with the neutral foreground color from the theme.Divider is styled with the brand color from the theme.Divider is styled with a strong color that emphasizes the visual separation.Divider is styled with a subtle color to de-emphasize the visual separation.See API at Divider.types.tsx.
<div>
<!-- ::before to handle the divider line independent of the divider having content or not -->
<div>Content</div>
<!-- ::after to handle the divider line that goes after the content if it has been provided. -->
</div>
This component has no state.
This component has no mouse, touch or keyboard interactions.
Content, if provided, will self-determine its behaviors.
Divider component should be assigned a role="separator" by default.Divider component should be named by its content.Divider component should have no other accessibility concerns otherwise. The descendant content in the divider must handle any required accessibility behaviors itself when appropriate.