<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WidgetKit",
  "identifier" : "/documentation/WidgetKit/ControlWidgetButton/init(action:label:)-77p8j",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "WidgetKit"
    ],
    "preciseIdentifier" : "s:9WidgetKit07ControlA6ButtonV6action5labelACyxAA0caD18DefaultActionLabelVq0_Gq0__xyctcAGRs_10AppIntents0J6IntentR0_rlufc"
  },
  "title" : "init(action:label:)"
}
-->

# init(action:label:)

Creates a button template for a control.

```
@MainActor @preconcurrency init(action: Action, @ViewBuilder label: @escaping () -> Label) where ActionLabel == ControlWidgetButtonDefaultActionLabel, Action : AppIntent
```

## Parameters

`action`

The action your button performs when pressed.

`label`

A view that renders the button.

---

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)