---
title: "init(_:bounds:state:subelements:)"
framework: appintents
role: symbol
role_heading: Initializer
path: "appintents/appentityuielement/init(_:bounds:state:subelements:)"
---

# init(_:bounds:state:subelements:)

Creates a wrapper object that combines an app entity with additional information to make it discoverable by Apple Intelligence and Siri.

## Declaration

```swift
init<Entity>(_ entity: Entity, bounds: CGRect, state: AppEntityUIElement.State = .init(), subelements: [AppEntityUIElement] = []) where Entity : AppEntity
```

## Parameters

- `entity`: The app entity that describes the content of an UI element.
- `bounds`: The UI element’s bounds in the local coordinate space of the entity provider’s associated custom view.
- `state`: The object that indicates whether the UI element is selected.
- `subelements`: An array of UI elements that represent a group of UI elements.
