<!--
{
  "availability" : [
    "macOS: 10.15.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/EnvironmentValues/controlActiveState",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17EnvironmentValuesV18controlActiveStateAA07ControlfG0Ovp"
  },
  "title" : "controlActiveState"
}
-->

# controlActiveState

The active appearance expected of controls in a window.

```
var controlActiveState: ControlActiveState { get set }
```

## Discussion

`ControlActiveState` and `EnvironmentValues.controlActiveState` are
deprecated, use `EnvironmentValues.appearsActive` instead.

Starting with macOS 15.0, the value of this environment property is
strictly mapped to and from `EnvironmentValues.appearsActive` as follows:

- `appearsActive == true`, `controlActiveState` returns `.key`
- `appearsActive == false`, `controlActiveState` returns `.inactive`
- `controlActiveState` is set to `.key` or `.active`, `appearsActive`
  will be set to `true`.
- `controlActiveState` is set to `.inactive`, `appearsActive` will be
  set to `false`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)