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

# ControlWidgetTemplate

A type that describes a control widget’s content.

```
@MainActor @preconcurrency protocol ControlWidgetTemplate
```

## Overview

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

## Topics

### Associated Types

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

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

### Instance Properties

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

The content and behavior of this control widget.

### Instance Methods

[`func disabled(Bool) -> some ControlWidgetTemplate`](/documentation/SwiftUI/ControlWidgetTemplate/disabled(_:))

Determines whether people can interact with this control.

[`func privacySensitive(Bool) -> some ControlWidgetTemplate`](/documentation/SwiftUI/ControlWidgetTemplate/privacySensitive(_:))

Marks the control template as containing sensitive, private user data.

[`func tint(Color?) -> some ControlWidgetTemplate`](/documentation/SwiftUI/ControlWidgetTemplate/tint(_:))

Sets the tint color within this control template.

## Relationships

### Conforming Types

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

---

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)