<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ControlWidget",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI13ControlWidgetP"
  },
  "title" : "ControlWidget"
}
-->

# ControlWidget

The configuration and content of a control widget to display in system spaces
such as Control Center, the Lock Screen, and the Action Button.

```
@MainActor @preconcurrency protocol ControlWidget
```

## Overview

Controls allow users to quickly read the state of your app or its
accessories, and take quick actions, without having to open your app. Users
can add, configure, and arrange controls to suit their individual needs. You
can provide multiple types of controls, each representing a specific kind of
action.

There are three key components to a control:

- A configuration that determines whether the control is configurable,
  identifies the control, and defines the SwiftUI template that provides the
  control’s content.
- A value provider that defines the value of the control when being
  previewed and when being actually rendered
- The template used by WidgetKit to display the control.

Controls are defined using templates in order to ensure that they control
will work at all sizes and in all system spaces in which they might be
displayed. These templates define images (specifically, symbol images) and
text using simple SwiftUI views like [`Label`](/documentation/SwiftUI/Label), [`Text`](/documentation/SwiftUI/Text), and [`Image`](/documentation/SwiftUI/Image); and
tint colors using the [`tint(_:)`](/documentation/SwiftUI/ControlWidgetTemplate/tint(_:)) modifier.

A type conforming to this protocol inherits `@preconcurrency @MainActor`
isolation from the protocol if the conformance is included in the type’s
base declaration:

```
struct MyCustomType: Transition {
    // `@preconcurrency @MainActor` isolation by default
}
```

Isolation to the main actor is the default, but it’s not required. Declare
the conformance in an extension to opt out of main actor isolation:

```
extension MyCustomType: Transition {
    // `nonisolated` by default
}
```

---

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)