iced-cube

Layout

Separator

A thin line that divides related groups of content, with optional inline text.

use iced_cube::{separator, vertical_separator};
use iced_cube::primitives::separator::Orientation;
API reference
With label: Inline text such as "or" between two alternatives.With label: Inline text such as "or" between two alternatives.
Static preview
With label. Inline text such as "or" between two alternatives.

Usage

Separators are one pixel wide and take their colour from the theme’s border token. Space around them comes from the parent’s spacing.

A vertical separator fills the height of its row, so give the row a height (or let taller siblings set it) when the separator sits between short items such as links.

Examples

Horizontal and vertical

A horizontal rule between sections and vertical rules between links.

Horizontal and vertical: A horizontal rule between sections and vertical rules between links.Horizontal and vertical: A horizontal rule between sections and vertical rules between links.
Static preview

API

ItemDescription
separator()Creates a horizontal line that fills the available width.
vertical_separator()Creates a vertical line that fills the available height.
.orientation(Orientation)Horizontal or Vertical. Defaults to Horizontal.
.label(text)Shows short muted text, such as "or", in the middle of the line.
Esc