Horizontal or vertical rule (divider line).
Props
height(number) -- line thickness in pixels (for horizontal rules). Default: 1.width(number) -- line thickness in pixels (for vertical rules). Also acceptsthickness.direction--:horizontal(default) or:vertical. SeeToddy.Iced.Direction.style-- named preset atom (:default,:weak) orStyleMap.t()for custom styling. SeeToddy.Iced.StyleMap.a11y(map) -- accessibility overrides. SeeToddy.Iced.A11y.
Summary
Functions
Sets accessibility annotations.
Converts this rule struct to a ui_node() map via the Toddy.Iced.Widget protocol.
Sets the rule direction.
Sets the rule height (thickness for horizontal rules).
Creates a new rule struct with optional keyword opts.
Sets the rule style.
Sets the rule width (thickness for vertical rules).
Applies keyword options to an existing rule struct.
Types
@type option() :: {:height, number()} | {:width, number()} | {:direction, Toddy.Iced.Direction.t()} | {:style, style()} | {:a11y, Toddy.Iced.A11y.t()}
@type preset() :: :weak | :default
@type style() :: preset() | Toddy.Iced.StyleMap.t()
@type t() :: %Toddy.Iced.Widget.Rule{ a11y: Toddy.Iced.A11y.t() | nil, direction: Toddy.Iced.Direction.t() | nil, height: number() | nil, id: String.t(), style: style() | nil, width: number() | nil }
Functions
@spec a11y(rule :: t(), a11y :: Toddy.Iced.A11y.t()) :: t()
Sets accessibility annotations.
@spec build(rule :: t()) :: Toddy.Iced.ui_node()
Converts this rule struct to a ui_node() map via the Toddy.Iced.Widget protocol.
@spec direction(rule :: t(), direction :: Toddy.Iced.Direction.t()) :: t()
Sets the rule direction.
Sets the rule height (thickness for horizontal rules).
Creates a new rule struct with optional keyword opts.
Sets the rule style.
Sets the rule width (thickness for vertical rules).
Applies keyword options to an existing rule struct.