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