plushie/widget/keyed_column

Keyed column widget builder (column with keyed children for efficient diffing).

Types

pub opaque type KeyedColumn

Option type for keyed column properties.

pub type Opt {
  Spacing(Float)
  Padding(padding.Padding)
  Width(length.Length)
  Height(length.Length)
  MaxWidth(Float)
  AlignX(alignment.Alignment)
  A11y(a11y.A11y)
}

Constructors

Values

pub fn a11y(kc: KeyedColumn, a: a11y.A11y) -> KeyedColumn

Set accessibility properties for this widget.

pub fn align_x(
  kc: KeyedColumn,
  a: alignment.Alignment,
) -> KeyedColumn

Set the horizontal alignment.

pub fn build(kc: KeyedColumn) -> node.Node

Build the keyed column into a renderable Node.

pub fn extend(
  kc: KeyedColumn,
  children: List(node.Node),
) -> KeyedColumn

Add multiple child nodes.

pub fn height(kc: KeyedColumn, h: length.Length) -> KeyedColumn

Set the height.

pub fn max_width(kc: KeyedColumn, m: Float) -> KeyedColumn

Set the maximum width.

pub fn new(id: String) -> KeyedColumn

Create a new keyed column builder.

pub fn padding(
  kc: KeyedColumn,
  p: padding.Padding,
) -> KeyedColumn

Set the padding.

pub fn push(kc: KeyedColumn, child: node.Node) -> KeyedColumn

Add a child node.

pub fn spacing(kc: KeyedColumn, s: Float) -> KeyedColumn

Set the spacing between children.

pub fn width(kc: KeyedColumn, w: length.Length) -> KeyedColumn

Set the width.

pub fn with_opts(kc: KeyedColumn, opts: List(Opt)) -> KeyedColumn

Apply a list of options to a keyed column builder.

Search Document