Skip to main content

Module divider

Module divider 

Source
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::thickness and the color defaults to BorderRole::Divider; both can be overridden.

Constants§

DIVIDER_THICKNESS
Default visual thickness of a Divider stroke. Divider has no per-widget Recipe*Style module, so the constant lives alongside the widget that reads it.