Floating overlay -- positions child with optional translation and scaling.
Props
translate_x(number) -- horizontal translation in pixels. Default: 0.translate_y(number) -- vertical translation in pixels. Default: 0.scale(number) -- scale factor for the child content.a11y(map) -- accessibility overrides. SeeToddy.Iced.A11y.
Summary
Functions
Sets accessibility annotations.
Converts this float struct to a ui_node() map via the Toddy.Iced.Widget protocol.
Appends multiple children to the float.
Creates a new float struct with optional keyword opts.
Appends a child to the float.
Sets the scale factor.
Sets the horizontal translation in pixels.
Sets the vertical translation in pixels.
Applies keyword options to an existing float struct.
Types
@type option() :: {:translate_x, number()} | {:translate_y, number()} | {:scale, number()} | {:a11y, Toddy.Iced.A11y.t()}
@type t() :: %Toddy.Iced.Widget.Float{ a11y: Toddy.Iced.A11y.t() | nil, children: [Toddy.Iced.ui_node() | struct()], id: String.t(), scale: number() | nil, translate_x: number() | nil, translate_y: number() | nil }
Functions
@spec a11y(float_widget :: t(), a11y :: Toddy.Iced.A11y.t()) :: t()
Sets accessibility annotations.
@spec build(float_widget :: t()) :: Toddy.Iced.ui_node()
Converts this float struct to a ui_node() map via the Toddy.Iced.Widget protocol.
@spec extend(float_widget :: t(), children :: [Toddy.Iced.ui_node() | struct()]) :: t()
Appends multiple children to the float.
Creates a new float struct with optional keyword opts.
@spec push(float_widget :: t(), child :: Toddy.Iced.ui_node() | struct()) :: t()
Appends a child to the float.
Sets the scale factor.
Sets the horizontal translation in pixels.
Sets the vertical translation in pixels.
Applies keyword options to an existing float struct.