Column layout -- arranges children vertically.
Props
spacing(number) -- vertical space between children in pixels. Default: 0.padding(number | map) -- padding inside the column. Accepts a uniform number or%{top, right, bottom, left}map. SeePlushie.Type.Padding.width(length) -- width of the column. Default: shrink. SeePlushie.Type.Length.height(length) -- height of the column. Default: shrink.max_width(number) -- maximum width in pixels.align_x-- horizontal alignment of children::left,:center,:right. SeePlushie.Type.Alignment.clip(boolean) -- clip children that overflow. Default: false.wrap(boolean) -- wrap children to next column when they overflow. Default: false.a11y(map) -- accessibility overrides. SeePlushie.Type.A11y.
Summary
Functions
Sets accessibility annotations.
Sets the horizontal alignment of children.
Converts this column struct to a ui_node() map via the Plushie.Widget protocol.
Sets whether children that overflow are clipped.
Appends multiple children to the column.
Sets the column height.
Sets the maximum width in pixels.
Creates a new column struct with optional keyword opts.
Sets the padding inside the column.
Appends a child to the column.
Sets the spacing between children in pixels.
Sets the column width.
Applies keyword options to an existing column struct.
Sets whether children wrap to the next column on overflow.
Types
@type option() :: {:spacing, number()} | {:padding, Plushie.Type.Padding.t()} | {:width, Plushie.Type.Length.t()} | {:height, Plushie.Type.Length.t()} | {:max_width, number()} | {:align_x, Plushie.Type.Alignment.t()} | {:clip, boolean()} | {:wrap, boolean()} | {:a11y, Plushie.Type.A11y.t() | map() | keyword()}
@type t() :: %Plushie.Widget.Column{ a11y: Plushie.Type.A11y.t() | nil, align_x: Plushie.Type.Alignment.t() | nil, children: [Plushie.Widget.child()], clip: boolean() | nil, 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, wrap: boolean() | nil }
Functions
@spec a11y(column :: t(), a11y :: Plushie.Type.A11y.t() | map() | keyword()) :: t()
Sets accessibility annotations.
@spec align_x(column :: t(), align_x :: Plushie.Type.Alignment.t()) :: t()
Sets the horizontal alignment of children.
@spec build(column :: t()) :: Plushie.Widget.ui_node()
Converts this column struct to a ui_node() map via the Plushie.Widget protocol.
Sets whether children that overflow are clipped.
@spec extend(column :: t(), children :: [Plushie.Widget.child()]) :: t()
Appends multiple children to the column.
@spec height(column :: t(), height :: Plushie.Type.Length.t()) :: t()
Sets the column height.
Sets the maximum width in pixels.
Creates a new column struct with optional keyword opts.
@spec padding(column :: t(), padding :: Plushie.Type.Padding.t()) :: t()
Sets the padding inside the column.
@spec push(column :: t(), child :: Plushie.Widget.child()) :: t()
Appends a child to the column.
Sets the spacing between children in pixels.
@spec width(column :: t(), width :: Plushie.Type.Length.t()) :: t()
Sets the column width.
Applies keyword options to an existing column struct.
Sets whether children wrap to the next column on overflow.