<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/HelpLink",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI8HelpLinkV"
  },
  "title" : "HelpLink"
}
-->

# HelpLink

A button with a standard appearance that opens app-specific help
documentation.

```
@MainActor @preconcurrency struct HelpLink
```

## Overview

A help link opens documentation relevant to the context where they are
used. Typically this is by opening to an anchor in an Apple Help book,
but can also perform an arbitrary action such as opening a URL or opening
a window.

```
HelpLink(anchor: "accountSetupHelp")

HelpLink {
    openURL(onlineHelpURL)
}
```

Help links have a standard appearance, as well as conventional placement
within a view. When used within an alert or confirmation dialog’s actions,
the help link will automatically be placed in the top trailing corner.
Or when used in a sheet toolbar, the help link is automatically placed
in the lower leading corner.

```
struct SheetContentView: View {
    var body: some View {
        Form {
             ...
        }
        .toolbar {
            ToolbarItem(.confirmationAction) {
                Button("Save") { ... }
            }
            ToolbarItem(.cancellationAction) {
                Button("Cancel") { ... }
            }
            ToolbarItem {
                HelpLink(anchor: "sheetHelp")
            }
         }
    }
}
```

## Topics

### Creating a help link

[`init(action:)`](/documentation/SwiftUI/HelpLink/init(action:))

Constructs a new help link with the specified action.

[`init(destination:)`](/documentation/SwiftUI/HelpLink/init(destination:))

Constructs a new help link that opens the specified destination URL.

[`init(anchor:)`](/documentation/SwiftUI/HelpLink/init(anchor:))

Constructs a new help link with the specified anchor in the main
app bundle’s book.

[`init(anchor:book:)`](/documentation/SwiftUI/HelpLink/init(anchor:book:))

Constructs a new help link with the specified anchor and book.



---

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)