<!--
{
  "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/ControlWidgetConfiguration",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI26ControlWidgetConfigurationP"
  },
  "title" : "ControlWidgetConfiguration"
}
-->

# ControlWidgetConfiguration

A type that describes a control widget’s content.

```
@MainActor @preconcurrency protocol ControlWidgetConfiguration
```

## Overview

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
}
```

## Topics

### Associated Types

[`associatedtype Body : ControlWidgetConfiguration`](/documentation/SwiftUI/ControlWidgetConfiguration/Body-swift.associatedtype)

The type of control widget configuration representing the body of this
configuration.

### Instance Properties

[`var body: Self.Body`](/documentation/SwiftUI/ControlWidgetConfiguration/body-swift.property)

The content and behavior of the control.

### Instance Methods

[`func description(LocalizedStringResource) -> some ControlWidgetConfiguration`](/documentation/SwiftUI/ControlWidgetConfiguration/description(_:))

Sets the description shown for the control when a user adds or edits it,
using the specified string.

[`func displayName(LocalizedStringResource) -> some ControlWidgetConfiguration`](/documentation/SwiftUI/ControlWidgetConfiguration/displayName(_:))

Sets the name shown for the control when a user adds or edits it, using
the specified string.

[`func promptsForUserConfiguration() -> some ControlWidgetConfiguration`](/documentation/SwiftUI/ControlWidgetConfiguration/promptsForUserConfiguration())

Specifies that a control’s configuration UI should be automatically presented after the widget is added.

[`func pushHandler(any ControlPushHandler.Type) -> some ControlWidgetConfiguration`](/documentation/SwiftUI/ControlWidgetConfiguration/pushHandler(_:))

Register a type that can handle push tokens changing for controls of this type.

## Relationships

### Conforming Types

[`EmptyControlWidgetConfiguration`](/documentation/SwiftUI/EmptyControlWidgetConfiguration)

---

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)