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
Code
In Forms
Common pattern for login/signup forms to separate primary and alternative actions.
Code
Content Sections
Use to mark transitions between content sections.
This is the introduction to our guide. It covers the basics you need to know before getting started.
Now we dive into the details. This chapter covers installation and setup procedures.
Code
Variations
The text content can be anything meaningful for the context.
CSS Implementation
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 Elements
- hr - Horizontal rule without text
- layout-stack - Vertical stacking
- form-field - Form field wrapper