Expand description
Divider — a themed separator line that visually partitions content.
Divider renders a single hairline stroke (DIVIDER_THICKNESS = 1 dp by
default) using the theme’s divider color. It comes in two orientations:
horizontal (the default, spans the proposed width and has a fixed 1 dp
height) and vertical (spans the proposed height, 1 dp wide). Both the
thickness and the color can be overridden per-instance without a custom
style.
§Accessibility
The widget emits Role::Splitter, which matches the ARIA separator pattern
and signals a structural boundary to screen readers.
// Horizontal rule between two content sections
let _rule = Divider::new();
// Vertical rule inside a toolbar
let _vbar = Divider::vertical();Structs§
- Divider
- A themed separator line. Thickness defaults to
DividerStyle::thicknessand the color defaults toBorderRole::Divider; both can be overridden.
Constants§
- DIVIDER_
THICKNESS - Default visual thickness of a
Dividerstroke. Divider has no per-widgetRecipe*Stylemodule, so the constant lives alongside the widget that reads it.