Divider

Divider — a themed separator line that visually partitions content.
Public types
| Kind | Name |
|---|---|
struct | Divider — A themed separator line |
const | DIVIDER_THICKNESS — Default visual thickness of a Divider stroke |
Public functions
Divider
| Returns | Function |
|---|---|
| Constructors | |
Self | new() |
Self | horizontal() |
Self | vertical() |
| Builder methods | |
Self | thickness(thickness: f32) |
Self | color(color: impl Into<ColorProp>) |
Detailed description
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.
#![allow(unused)] fn main() { use teksilo_widgets::primitives::Divider; // Horizontal rule between two content sections let _rule = Divider::new(); // Vertical rule inside a toolbar let _vbar = Divider::vertical(); }
Density
The picture above is the widget at TargetDensity::Compact, the mouse-and-keyboard ladder. Below is the same subject on the same canvas with only the ladder changed, so what moves is the density and nothing else — where the subject no longer fits, that is what the denser targets cost it at that size. See docs/density-and-targets.md.
Touch

API reference
📖 Full rustdoc API for this module
pub struct Divider
Import: use teksilo::widgets::Divider;
A themed separator line. Thickness defaults to DIVIDER_THICKNESS
and the color defaults to BorderRole::Divider; both can be overridden.
#![allow(unused)] fn main() { pub struct Divider { /* fields */ } }
Methods
pub fn new() -> Self
Create a horizontal Divider with default theme thickness and color.
pub fn horizontal() -> Self
Create a horizontal Divider — alias for Divider::new().
pub fn vertical() -> Self
Create a vertical Divider that spans the proposed height.
pub fn thickness(mut self, thickness: f32) -> Self
Override the stroke thickness in logical pixels; defaults to
DIVIDER_THICKNESS (1 dp).
pub fn color(mut self, color: impl Into<ColorProp>) -> Self (default: None)
Override the line color. Accepts Color, a role (typically
BorderRole), or a Signal<Color>.
pub const DIVIDER_THICKNESS
Import: use teksilo::widgets::primitives::divider::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.
#![allow(unused)] fn main() { pub const DIVIDER_THICKNESS: f32 = 1.0; }