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

Row layout -- arranges children horizontally.

## Props

- `spacing` (number) -- horizontal space between children in pixels. Default: 0.
- `padding` (number | map) -- padding inside the row. See `Plushie.Type.Padding`.
- `width` (length) -- width of the row. Default: shrink. See `Plushie.Type.Length`.
- `height` (length) -- height of the row. Default: shrink.
- `align_y` -- vertical alignment of children: `:top`, `:center`, `:bottom`. See `Plushie.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. 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()}
  | {:align_y, Plushie.Type.Alignment.t()}
  | {:max_width, number()}
  | {:clip, boolean()}
  | {:wrap, boolean()}
  | {:a11y, Plushie.Type.A11y.t() | map() | keyword()}
```

# `t`

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

# `a11y`

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

Sets accessibility annotations.

# `align_y`

```elixir
@spec align_y(row :: t(), align_y :: Plushie.Type.Alignment.t()) :: t()
```

Sets the vertical alignment of children.

# `build`

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

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

# `clip`

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

Sets whether children that overflow are clipped.

# `extend`

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

Appends multiple children to the row.

# `height`

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

Sets the row height.

# `max_width`

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

Sets the maximum width of the row in pixels.

# `new`

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

Creates a new row struct with optional keyword opts.

# `padding`

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

Sets the padding inside the row.

# `push`

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

Appends a child to the row.

# `spacing`

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

Sets the spacing between children in pixels.

# `width`

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

Sets the row width.

# `with_options`

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

Applies keyword options to an existing row struct.

# `wrap`

```elixir
@spec wrap(row :: t(), wrap :: boolean()) :: t()
```

Sets whether children wrap to the next row on overflow.

---

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