# `Plushie.Canvas.Circle`
[🔗](https://github.com/plushie-ui/plushie-elixir/blob/v0.7.2/lib/plushie/canvas/circle.ex#L1)

Canvas circle element with center, radius, and optional styling.

# `option`

```elixir
@type option() ::
  ((((({:x, number()} | {:y, number()}) | {:r, number()}) | {:fill, term()})
    | {:stroke,
       %Plushie.Canvas.Stroke{
         cap: term(),
         color: term(),
         dash: term(),
         join: term(),
         width: term()
       }
       | keyword()
       | map()})
   | {:opacity, number()})
  | {:fill_rule, String.t() | atom()}
```

# `t`

```elixir
@type t() :: %Plushie.Canvas.Circle{
  fill:
    term()
    | Plushie.Animation.Transition.t()
    | Plushie.Animation.Spring.t()
    | Plushie.Animation.Sequence.t()
    | nil,
  fill_rule:
    (String.t() | atom())
    | Plushie.Animation.Transition.t()
    | Plushie.Animation.Spring.t()
    | Plushie.Animation.Sequence.t()
    | nil,
  id: String.t() | nil,
  opacity:
    number()
    | Plushie.Animation.Transition.t()
    | Plushie.Animation.Spring.t()
    | Plushie.Animation.Sequence.t()
    | nil,
  r:
    number()
    | Plushie.Animation.Transition.t()
    | Plushie.Animation.Spring.t()
    | Plushie.Animation.Sequence.t()
    | nil,
  stroke:
    %Plushie.Canvas.Stroke{
      cap: term(),
      color: term(),
      dash: term(),
      join: term(),
      width: term()
    }
    | Plushie.Animation.Transition.t()
    | Plushie.Animation.Spring.t()
    | Plushie.Animation.Sequence.t()
    | nil,
  x:
    number()
    | Plushie.Animation.Transition.t()
    | Plushie.Animation.Spring.t()
    | Plushie.Animation.Sequence.t()
    | nil,
  y:
    number()
    | Plushie.Animation.Transition.t()
    | Plushie.Animation.Spring.t()
    | Plushie.Animation.Sequence.t()
    | nil
}
```

# `build`

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

Converts this widget struct to a `ui_node()` map.

# `fill`

```elixir
@spec fill(widget :: t(), value :: term() | nil) :: t()
```

Fill color or gradient.

Accepts `term()`.

# `fill_rule`

```elixir
@spec fill_rule(widget :: t(), value :: (String.t() | atom()) | nil) :: t()
```

Fill rule: "non_zero" or "even_odd".

Accepts `String.t() | atom()`.

# `new`

# `new`

Creates a new element without an explicit ID (auto-assigned by parent container).

# `new`

Creates a new element with the given ID, positional args, and keyword options.

# `opacity`

```elixir
@spec opacity(widget :: t(), value :: number() | nil) :: t()
```

Opacity from 0.0 to 1.0.

Accepts `number()`.

# `r`

```elixir
@spec r(widget :: t(), value :: number() | nil) :: t()
```

Radius in pixels.

Accepts `number()`.

# `stroke`

```elixir
@spec stroke(
  widget :: t(),
  value ::
    (%Plushie.Canvas.Stroke{
       cap: term(),
       color: term(),
       dash: term(),
       join: term(),
       width: term()
     }
     | keyword()
     | map())
    | nil
) :: t()
```

Stroke descriptor.

Accepts `%Plushie.Canvas.Stroke{}`.

# `type_name`

```elixir
@spec type_name() :: String.t()
```

Returns the element type string for the wire protocol.

# `with_options`

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

Applies keyword options to an existing widget struct.

# `x`

```elixir
@spec x(widget :: t(), value :: number() | nil) :: t()
```

Center X in pixels.

Accepts `number()`.

# `y`

```elixir
@spec y(widget :: t(), value :: number() | nil) :: t()
```

Center Y in pixels.

Accepts `number()`.

---

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