# `Plushie.Widget.KeyedColumn`
[🔗](https://github.com/plushie-ui/plushie-elixir/blob/v0.6.0/lib/plushie/widget/keyed_column.ex#L1)

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. See `Plushie.Type.Padding`.
- `width` (length) -- column width. Default: shrink. See `Plushie.Type.Length`.
- `height` (length) -- column height. Default: shrink.
- `max_width` (number) -- maximum width in pixels.
- `a11y` (map) -- accessibility overrides. See `Plushie.Type.A11y`.

# `option`

```elixir
@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()}
```

# `t`

```elixir
@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
}
```

# `a11y`

```elixir
@spec a11y(keyed_column :: t(), a11y :: Plushie.Type.A11y.t() | map() | keyword()) ::
  t()
```

Sets accessibility annotations.

# `build`

```elixir
@spec build(keyed_column :: t()) :: Plushie.Widget.ui_node()
```

Converts this keyed column struct to a `ui_node()` map via the `Plushie.Widget` protocol.

# `extend`

```elixir
@spec extend(
  keyed_column :: t(),
  children :: [Plushie.Widget.child()]
) :: t()
```

Appends multiple children to the keyed column.

# `height`

```elixir
@spec height(keyed_column :: t(), height :: Plushie.Type.Length.t()) :: t()
```

Sets the column height.

# `max_width`

```elixir
@spec max_width(keyed_column :: t(), max_width :: number()) :: t()
```

Sets the maximum width in pixels.

# `new`

```elixir
@spec new(id :: String.t(), opts :: [option()]) :: t()
```

Creates a new keyed column struct with optional keyword opts.

# `padding`

```elixir
@spec padding(keyed_column :: t(), padding :: Plushie.Type.Padding.t()) :: t()
```

Sets the padding inside the column.

# `push`

```elixir
@spec push(keyed_column :: t(), child :: Plushie.Widget.child()) :: t()
```

Appends a child to the keyed column.

# `spacing`

```elixir
@spec spacing(keyed_column :: t(), spacing :: number()) :: t()
```

Sets the spacing between children in pixels.

# `width`

```elixir
@spec width(keyed_column :: t(), width :: Plushie.Type.Length.t()) :: t()
```

Sets the column width.

# `with_options`

```elixir
@spec with_options(keyed_column :: t(), opts :: [option()]) :: t()
```

Applies keyword options to an existing keyed column struct.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
