---
title: "init(id:in:behavior:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/hovereffectgroup/init(id:in:behavior:)"
---

# init(id:in:behavior:)

Creates a new HoverEffectGroup.

## Declaration

```swift
init(id: String?, in namespace: Namespace.ID, behavior: HoverEffectGroup.Behavior = .activatesGroup)
```

## Parameters

- `id`: An optional id to give the group. If provided, the group will be uniquely identified by combining the id and the namespace.
- `namespace`: The namespace that identifies the group.
- `behavior`: How the effect will behave relative to other effects in the group.

## Return Value

Return Value A new HoverEffectGroup
