Per-subtree theme override, applies a different theme to a single child widget.
Props
| Name | Type | Default | Description |
|---|---|---|---|
theme | atom() | map() | nil | Built-in theme atom (e.g. :dark, :nord) or custom palette map. |
event_rate | integer() | nil | Max events per second for coalescable events. |
a11y | %Plushie.Type.A11y{} | map() | keyword() | nil | Accessibility annotations. |
Summary
Functions
Accessibility annotations.
Converts this widget struct to a ui_node() map. Validates at most one child.
Max events per second for coalescable events.
Appends multiple children to the widget.
Creates a new themer. Accepts keyword opts or a direct theme value.
Appends a child to the widget.
Built-in theme atom (e.g. :dark, :nord) or custom palette map.
Creates a :themer widget.
Applies keyword options to an existing widget struct.
Types
@type option() :: ({:theme, atom() | map()} | {:event_rate, integer()}) | {:a11y, %Plushie.Type.A11y{ active_descendant: term(), busy: term(), described_by: term(), description: term(), disabled: term(), error_message: term(), expanded: term(), has_popup: term(), hidden: term(), invalid: term(), label: term(), label_from: term(), labelled_by: term(), level: term(), live: term(), mnemonic: term(), modal: term(), orientation: term(), position_in_set: term(), radio_group: term(), read_only: term(), required: term(), role: term(), selected: term(), size_of_set: term(), toggled: term(), value: term() } | map() | keyword()}
@type t() :: %Plushie.Widget.Themer{ a11y: (%Plushie.Type.A11y{ active_descendant: term(), busy: term(), described_by: term(), description: term(), disabled: term(), error_message: term(), expanded: term(), has_popup: term(), hidden: term(), invalid: term(), label: term(), label_from: term(), labelled_by: term(), level: term(), live: term(), mnemonic: term(), modal: term(), orientation: term(), position_in_set: term(), radio_group: term(), read_only: term(), required: term(), role: term(), selected: term(), size_of_set: term(), toggled: term(), value: term() } | map() | keyword()) | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, children: [Plushie.Widget.ui_node()], event_rate: integer() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, id: String.t(), theme: (atom() | map()) | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil }
Functions
@spec a11y( widget :: t(), value :: (%Plushie.Type.A11y{ active_descendant: term(), busy: term(), described_by: term(), description: term(), disabled: term(), error_message: term(), expanded: term(), has_popup: term(), hidden: term(), invalid: term(), label: term(), label_from: term(), labelled_by: term(), level: term(), live: term(), mnemonic: term(), modal: term(), orientation: term(), position_in_set: term(), radio_group: term(), read_only: term(), required: term(), role: term(), selected: term(), size_of_set: term(), toggled: term(), value: term() } | map() | keyword()) | nil ) :: t()
Accessibility annotations.
Accepts %Plushie.Type.A11y{} | map() | keyword().
@spec build(widget :: t()) :: Plushie.Widget.ui_node()
Converts this widget struct to a ui_node() map. Validates at most one child.
Max events per second for coalescable events.
Accepts integer().
@spec extend(widget :: t(), children :: [Plushie.Widget.child()]) :: t()
Appends multiple children to the widget.
Creates a new themer. Accepts keyword opts or a direct theme value.
@spec push(widget :: t(), child :: Plushie.Widget.child()) :: t()
Appends a child to the widget.
Built-in theme atom (e.g. :dark, :nord) or custom palette map.
Accepts atom() | map().
Creates a :themer widget.
Shorthand for new/2. Import this macro to use the widget name
directly in view functions:
import Plushie.Widget.Themer, only: [themer: 2]
themer("my-id", prop: value)
Applies keyword options to an existing widget struct.