text-divider

Horizontal divider with centered text. Use to separate content sections or provide alternative action labels.

Overview

The text-divider element creates a horizontal line with centered text. Common uses include separating form sections ("or"), chapter markers, and content transitions.

Attributes

This element has no custom attributes. It's styled purely through CSS.

Basic Usage

In Forms

Common pattern for login/signup forms to separate primary and alternative actions.

Content Sections

Use to mark transitions between content sections.

Variations

The text content can be anything meaningful for the context.

Accessibility

  • The divider is purely decorative - screen readers will read the text content naturally
  • Avoid using the divider for critical navigation or structural purposes
  • Keep text concise and meaningful

Related