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

A text annotation to print on a `ExRatatui.Widgets.Canvas`.

Unlike the geometric shapes, a label is rendered as plain terminal
text on top of the canvas — it ignores the marker and is unaffected
by canvas layers. Useful for axis labels, legends, or callouts on
top of plotted data.

`:x` and `:y` pin the **left edge** of the text in canvas
coordinates.

## Fields

  * `:x` - x coordinate (required)
  * `:y` - y coordinate (required)
  * `:text` - string to print (required)
  * `:color` - `ExRatatui.Style.color()` for the text (required)

## Examples

    iex> alias ExRatatui.Widgets.Canvas.Label
    iex> %Label{x: 0.0, y: 5.0, text: "origin", color: :white}
    %ExRatatui.Widgets.Canvas.Label{
      x: 0.0,
      y: 5.0,
      text: "origin",
      color: :white
    }

# `t`

```elixir
@type t() :: %ExRatatui.Widgets.Canvas.Label{
  color: ExRatatui.Style.color(),
  text: String.t(),
  x: number(),
  y: number()
}
```

---

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