<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSControl/StateValue",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSControlStateValue"
  },
  "title" : "NSControl.StateValue"
}
-->

# NSControl.StateValue

A constant that indicates whether a control is on, off, or in a mixed state.

```
struct StateValue
```

## Topics

### Setting a Control’s State

[`NSControlStateValueOn`](/documentation/AppKit/NSControl/StateValue/on)

A constant value that indicates a control is on or selected.

[`NSControlStateValueOff`](/documentation/AppKit/NSControl/StateValue/off)

A constant value that indicates a control is off or unselected.

[`NSControlStateValueMixed`](/documentation/AppKit/NSControl/StateValue/mixed)

A constant value that indicates a control is in a mixed state, neither on nor off.

### Creating a State Value

[`init(_:)`](/documentation/AppKit/NSControl/StateValue/init(_:))

Initializes a control state object.

[`init(rawValue:)`](/documentation/AppKit/NSControl/StateValue/init(rawValue:))

Initializes a state value from a raw value.

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

---

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)