<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TipKit",
  "identifier" : "/documentation/TipKit/Tips/Action/init(id:perform:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "TipKit"
    ],
    "preciseIdentifier" : "s:6TipKit4TipsO6ActionV2id7perform_AESSSg_yyc7SwiftUI4TextVyctcfc"
  },
  "title" : "init(id:perform:_:)"
}
-->

# init(id:perform:_:)

Creates a tip action that displays a custom label.

```
@preconcurrency init(id: String? = nil, perform handler: @escaping @MainActor @Sendable () -> Void = {}, _ label: @escaping @Sendable () -> Text)
```

## Parameters

`id`

An optional identifier associated with the action. If you don’t specify a value, the system assigns the action’s `index` to this value.

`handler`

The function the system calls when the action triggers.

`label`

A view that describes the purpose of the tip action.

---

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)