# `ExRatatui.Widgets.Canvas.Rectangle`
[🔗](https://github.com/mcass19/ex_ratatui/blob/v0.8.2/lib/ex_ratatui/widgets/canvas/rectangle.ex#L1)

A rectangle outline to paint on a `ExRatatui.Widgets.Canvas`.

`:x` and `:y` pin the **bottom-left** corner in canvas coordinates —
not terminal cells. Only the border is drawn (ratatui's Canvas shape
has no fill).

## Fields

  * `:x` - bottom-left x coordinate (required)
  * `:y` - bottom-left y coordinate (required)
  * `:width` - non-negative width in canvas units (required)
  * `:height` - non-negative height in canvas units (required)
  * `:color` - `ExRatatui.Style.color()` for the outline (required)

## Examples

    iex> alias ExRatatui.Widgets.Canvas.Rectangle
    iex> %Rectangle{x: 0.0, y: 0.0, width: 5.0, height: 3.0, color: :blue}
    %ExRatatui.Widgets.Canvas.Rectangle{
      x: 0.0,
      y: 0.0,
      width: 5.0,
      height: 3.0,
      color: :blue
    }

# `t`

```elixir
@type t() :: %ExRatatui.Widgets.Canvas.Rectangle{
  color: ExRatatui.Style.color(),
  height: number(),
  width: number(),
  x: number(),
  y: number()
}
```

---

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