---
title: "init(isSelected:)"
framework: appintents
role: symbol
role_heading: Initializer
path: "appintents/appentityuielement/state-swift.struct/init(isselected:)"
---

# init(isSelected:)

Creates the state that describes if a UI element is selected.

## Declaration

```swift
init(isSelected: Bool = false)
```

## Parameters

- `isSelected`: A Boolean value that indicates whether the UI element is selected.
