---
title: "init(_:content:)"
framework: widgetkit
role: symbol
role_heading: Initializer
path: "widgetkit/accessorywidgetgroup/init(_:content:)-nb0"
---

# init(_:content:)

Creates an AccessoryWidgetGroup that generates its label from a localized string key.

## Declaration

```swift
@MainActor @preconcurrency init(_ titleKey: LocalizedStringKey, @ViewBuilder content: () -> Content)
```

## Parameters

- `titleKey`: The key for the AccessoryWidgetGroup’s localized label.
- `content`: A view builder for the content of the accessory group.

## Discussion

Discussion This initializer creates a Text view on your behalf, and treats the localized key similar to Text/init(_:tableName:bundle:comment:). See Text for more information about localizing strings.
