Canvas text element with position, content, and optional font styling.
Summary
Functions
Horizontal alignment: "left", "center", "right".
Vertical alignment: "top", "center", "bottom".
Converts this widget struct to a ui_node() map.
Text string to draw.
Text fill color.
Font specification.
Creates a new element without an explicit ID (auto-assigned by parent container).
Creates a new element with the given ID, positional args, and keyword options.
Opacity from 0.0 to 1.0.
Font size in pixels.
Returns the element type string for the wire protocol.
Applies keyword options to an existing widget struct.
X position in pixels.
Y position in pixels.
Types
@type t() :: %Plushie.Canvas.Text{ align_x: (String.t() | atom()) | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, align_y: (String.t() | atom()) | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, content: (String.t() | atom()) | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, fill: term() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, font: (String.t() | atom()) | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, id: String.t() | nil, opacity: number() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, size: number() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, x: number() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, y: number() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil }
Functions
Horizontal alignment: "left", "center", "right".
Accepts String.t() | atom().
Vertical alignment: "top", "center", "bottom".
Accepts String.t() | atom().
@spec build(widget :: t()) :: Plushie.Widget.ui_node()
Converts this widget struct to a ui_node() map.
Text string to draw.
Accepts String.t() | atom().
Text fill color.
Accepts term().
Font specification.
Accepts String.t() | atom().
Creates a new element without an explicit ID (auto-assigned by parent container).
Creates a new element with the given ID, positional args, and keyword options.
Opacity from 0.0 to 1.0.
Accepts number().
Font size in pixels.
Accepts number().
@spec type_name() :: String.t()
Returns the element type string for the wire protocol.
Applies keyword options to an existing widget struct.
X position in pixels.
Accepts number().
Y position in pixels.
Accepts number().