# `Toddy.Iced.Widget.Stack`
[🔗](https://github.com/toddy-ui/toddy-elixir/blob/v0.3.0/lib/toddy/iced/widget/stack.ex#L1)

Stack layout -- layers children on top of each other.

## Props

- `width` (length) -- stack width. Default: shrink. See `Toddy.Iced.Length`.
- `height` (length) -- stack height. Default: shrink.
- `clip` (boolean) -- clip children that overflow. Default: false.
- `a11y` (map) -- accessibility overrides. See `Toddy.Iced.A11y`.

# `option`

```elixir
@type option() ::
  {:width, Toddy.Iced.Length.t()}
  | {:height, Toddy.Iced.Length.t()}
  | {:clip, boolean()}
  | {:a11y, Toddy.Iced.A11y.t()}
```

# `t`

```elixir
@type t() :: %Toddy.Iced.Widget.Stack{
  a11y: Toddy.Iced.A11y.t() | nil,
  children: [Toddy.Iced.ui_node() | struct()],
  clip: boolean() | nil,
  height: Toddy.Iced.Length.t() | nil,
  id: String.t(),
  width: Toddy.Iced.Length.t() | nil
}
```

# `a11y`

```elixir
@spec a11y(stack :: t(), a11y :: Toddy.Iced.A11y.t()) :: t()
```

Sets accessibility annotations.

# `build`

```elixir
@spec build(stack :: t()) :: Toddy.Iced.ui_node()
```

Converts this stack struct to a `ui_node()` map via the `Toddy.Iced.Widget` protocol.

# `clip`

```elixir
@spec clip(stack :: t(), clip :: boolean()) :: t()
```

Sets whether children that overflow are clipped.

# `extend`

```elixir
@spec extend(stack :: t(), children :: [Toddy.Iced.ui_node() | struct()]) :: t()
```

Appends multiple children to the stack.

# `height`

```elixir
@spec height(stack :: t(), height :: Toddy.Iced.Length.t()) :: t()
```

Sets the stack height.

# `new`

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

Creates a new stack struct with optional keyword opts.

# `push`

```elixir
@spec push(stack :: t(), child :: Toddy.Iced.ui_node() | struct()) :: t()
```

Appends a child to the stack.

# `width`

```elixir
@spec width(stack :: t(), width :: Toddy.Iced.Length.t()) :: t()
```

Sets the stack width.

# `with_options`

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

Applies keyword options to an existing stack struct.

---

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