Skip to content

Separator

A semantic horizontal or vertical divider with no built-in visual style.

Loading interactive demo…

#Import

Import separator from quickgui.

use quickgui::*;

#Usage

separator(SeparatorOrientation::Horizontal).w(240.0)

#Anatomy

  • separator::root

#API reference

Expand an entry for its description and complete signature. A dash means no declaration default is documented.

separator

View source
pub fn separator(orientation: SeparatorOrientation) -> Element

Create an unstyled semantic separator root. This shorthand is equivalent to `Separator::new(orientation).root_with(div())`. The caller still declares the rule's extent, because a zero-sized divider is a layout decision rather than a framework default.

Separator

View source
pub const fn new(orientation: SeparatorOrientation) -> Self

Declare a separator along `orientation`. Horizontal is the default, matching Base UI.

horizontalpub const fn horizontal() -> Self—

Declare a horizontal rule between vertically stacked content.

pub const fn horizontal() -> Self
View source
verticalpub const fn vertical() -> Self—

Declare a vertical rule between horizontally arranged content.

pub const fn vertical() -> Self
View source
axispub const fn axis(self) -> SeparatorOrientation—

Configures axis for this part.

pub const fn axis(self) -> SeparatorOrientation
View source

Separator::root_with

View source
pub fn root_with(self, root: Element) -> Element

Decorate an application-owned root without adding layout or appearance.

Separator::root

View source
pub fn root(self) -> Element

Create the unstyled root part. Use [`Self::root_with`] to supply an existing element.