# `ExRatatui.Layout.Padding`
[🔗](https://github.com/mcass19/ex_ratatui/blob/v0.10.1/lib/ex_ratatui/layout/padding.ex#L1)

Constructors for `%ExRatatui.Widgets.Block{}` padding tuples.

`Block`'s `:padding` field is a `{left, right, top, bottom}` tuple of
non-negative integers. Writing those out by hand is noisy for the
common symmetric cases — these helpers mirror ratatui's `Padding`
constructors and return the tuple `Block` already accepts, so they
drop straight into `padding:`.

    %Block{padding: ExRatatui.Layout.Padding.uniform(1)}
    %Block{padding: ExRatatui.Layout.Padding.symmetric(2, 1)}

Every helper returns a plain `{l, r, t, b}` tuple — there is no
struct and no runtime cost beyond building the tuple.

# `t`

```elixir
@type t() ::
  {non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer()}
```

# `horizontal`

```elixir
@spec horizontal(non_neg_integer()) :: t()
```

Padding on left + right only; top + bottom are zero.

## Examples

    iex> ExRatatui.Layout.Padding.horizontal(2)
    {2, 2, 0, 0}

# `new`

```elixir
@spec new(non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer()) ::
  t()
```

Explicit per-side padding. The identity constructor — included so a
call site can stay in the `Padding.*` namespace for all four cases.

## Examples

    iex> ExRatatui.Layout.Padding.new(1, 2, 3, 4)
    {1, 2, 3, 4}

# `symmetric`

```elixir
@spec symmetric(non_neg_integer(), non_neg_integer()) :: t()
```

Horizontal padding on left + right, vertical padding on top + bottom.

## Examples

    iex> ExRatatui.Layout.Padding.symmetric(3, 1)
    {3, 3, 1, 1}

# `uniform`

```elixir
@spec uniform(non_neg_integer()) :: t()
```

The same padding on all four sides.

## Examples

    iex> ExRatatui.Layout.Padding.uniform(2)
    {2, 2, 2, 2}

# `vertical`

```elixir
@spec vertical(non_neg_integer()) :: t()
```

Padding on top + bottom only; left + right are zero.

## Examples

    iex> ExRatatui.Layout.Padding.vertical(1)
    {0, 0, 1, 1}

---

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