Overview
The divider element renders a dividing line (horizontal rule) between elements, helping to visually separate content sections in your notifications. Dividers are simple but effective for improving readability and organization. When to use:- Separate distinct sections of content
- Create visual breaks between related items
- Improve readability in long notifications
- Organize grouped content visually
Basic Example
Fields
The type of element. For divider elements, this value must be
"divider".The CSS color to render the divider line with. Can be any valid CSS color value (e.g.,
"#e0e0e0", "rgb(224, 224, 224)", "gray"). Defaults to a standard gray color if not specified.Border width in pixels for the divider line (e.g.,
"1px", "2px"). Controls the thickness of the divider.Padding around the divider. Can be any valid CSS padding value (e.g.,
"10px", "20px 10px").An array of channel names. The divider will only be rendered for the specified channels. See Control Flow documentation for details.
Examples & Variants
Basic Divider
Simple divider with default styling:Styled Divider
Divider with custom color:Thick Divider
Divider with custom width:Divider with Padding
Divider with spacing:Section Separator
Using dividers to separate content sections:Channel-Specific Divider
Show divider only for specific channels:Best Practices
- Use sparingly: Too many dividers can make notifications cluttered
- Match brand colors: Use divider colors that match your brand palette
- Consider spacing: Add padding to dividers for better visual separation
- Channel considerations: Some channels (like SMS) may not render dividers, so don’t rely on them for critical content separation
Channel Support
- Email: ✅ Full support with styling
- Push: ⚠️ Limited support (may render as plain text or be ignored)
- SMS: ❌ Not supported (dividers are not rendered)
- Inbox: ✅ Full support with styling
Related Elements
- Text Element - For content sections separated by dividers
- Group Element - For grouping content with dividers
- Control Flow - For conditional rendering