<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Link/init(_:destination:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4LinkVA2A4TextVRszrlE_11destinationACyAEG10Foundation23LocalizedStringResourceV_AH3URLVtcfc::OverloadGroup"
  },
  "title" : "init(_:destination:)"
}
-->

# init(_:destination:)

Creates a control, consisting of a URL and a title resource, used to
navigate to a URL.

```
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, destination: URL)
```

## Parameters

`titleResource`

The localized title that describes the
purpose of this link.

`destination`

The URL for the link.

## Discussion

Use [`Link`](/documentation/SwiftUI/Link) to create a control that your app uses to navigate to a
URL that you provide. The example below creates a link to
`example.com` and uses `Visit Example Co` as the title key to
generate a link-styled view in your app:

```
Link("Visit Example Co",
      destination: URL(string: "https://www.example.com/")!)
```

---

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)