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

Canvas group: a structural container for transforms, clips, and
visual grouping.

Groups carry an ordered `transforms` list and an optional `clip`
rect. The optional `id` is for tree diffing and targeting, not
interactivity.

For interactive canvas elements (click, hover, drag, focus, a11y),
use `Plushie.Canvas.Interactive` via the `interactive` macro.

# `option`

```elixir
@type option() :: {:transforms, term()} | {:clip, term()}
```

# `t`

```elixir
@type t() :: %Plushie.Canvas.Group{
  children: [Plushie.Widget.ui_node()],
  clip:
    term()
    | Plushie.Animation.Transition.t()
    | Plushie.Animation.Spring.t()
    | Plushie.Animation.Sequence.t()
    | nil,
  id: String.t() | nil,
  transforms:
    term()
    | 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.

# `clip`

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

Clip rectangle for the group.

Accepts `term()`.

# `extend`

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

Appends multiple children to the widget.

# `new`

```elixir
@spec new(opts :: [option()]) :: t()
```

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

# `new`

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

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

# `push`

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

Appends a child to the widget.

# `transforms`

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

List of transform descriptors (translate, rotate, scale).

Accepts `term()`.

# `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.

---

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