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

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

## Props

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

# `option`

```elixir
@type option() ::
  {:width, Plushie.Type.Length.t()}
  | {:height, Plushie.Type.Length.t()}
  | {:clip, boolean()}
  | {:a11y, Plushie.Type.A11y.t() | map() | keyword()}
```

# `t`

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

# `a11y`

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

Sets accessibility annotations.

# `build`

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

Converts this stack struct to a `ui_node()` map via the `Plushie.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 :: [Plushie.Widget.child()]) :: t()
```

Appends multiple children to the stack.

# `height`

```elixir
@spec height(stack :: t(), height :: Plushie.Type.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 :: Plushie.Widget.child()) :: t()
```

Appends a child to the stack.

# `width`

```elixir
@spec width(stack :: t(), width :: Plushie.Type.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*
