Keyed column layout -- arranges children vertically with stable identity keys.
Like Column, but uses each child's id as a key for iced's internal
widget diffing. This avoids unnecessary rebuilds when items are added,
removed, or reordered in dynamic lists.
Props
spacing(number) -- vertical space between children in pixels. Default: 0.padding(number | map) -- padding inside the column. SeePlushie.Type.Padding.width(length) -- column width. Default: shrink. SeePlushie.Type.Length.height(length) -- column height. Default: shrink.max_width(number) -- maximum width in pixels.a11y(map) -- accessibility overrides. SeePlushie.Type.A11y.
Summary
Functions
Sets accessibility annotations.
Converts this keyed column struct to a ui_node() map via the Plushie.Widget protocol.
Appends multiple children to the keyed column.
Sets the column height.
Sets the maximum width in pixels.
Creates a new keyed column struct with optional keyword opts.
Sets the padding inside the column.
Appends a child to the keyed column.
Sets the spacing between children in pixels.
Sets the column width.
Applies keyword options to an existing keyed column struct.
Types
@type option() :: {:spacing, number()} | {:padding, Plushie.Type.Padding.t()} | {:width, Plushie.Type.Length.t()} | {:height, Plushie.Type.Length.t()} | {:max_width, number()} | {:a11y, Plushie.Type.A11y.t() | map() | keyword()}
@type t() :: %Plushie.Widget.KeyedColumn{ a11y: Plushie.Type.A11y.t() | nil, children: [Plushie.Widget.child()], height: Plushie.Type.Length.t() | nil, id: String.t(), max_width: number() | nil, padding: Plushie.Type.Padding.t() | nil, spacing: number() | nil, width: Plushie.Type.Length.t() | nil }
Functions
@spec a11y(keyed_column :: t(), a11y :: Plushie.Type.A11y.t() | map() | keyword()) :: t()
Sets accessibility annotations.
@spec build(keyed_column :: t()) :: Plushie.Widget.ui_node()
Converts this keyed column struct to a ui_node() map via the Plushie.Widget protocol.
@spec extend( keyed_column :: t(), children :: [Plushie.Widget.child()] ) :: t()
Appends multiple children to the keyed column.
@spec height(keyed_column :: t(), height :: Plushie.Type.Length.t()) :: t()
Sets the column height.
Sets the maximum width in pixels.
Creates a new keyed column struct with optional keyword opts.
@spec padding(keyed_column :: t(), padding :: Plushie.Type.Padding.t()) :: t()
Sets the padding inside the column.
@spec push(keyed_column :: t(), child :: Plushie.Widget.child()) :: t()
Appends a child to the keyed column.
Sets the spacing between children in pixels.
@spec width(keyed_column :: t(), width :: Plushie.Type.Length.t()) :: t()
Sets the column width.
Applies keyword options to an existing keyed column struct.