---
title: "init(_:destination:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/link/init(_:destination:)"
---

# init(_:destination:)

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

## Declaration

```swift
nonisolated init(_ titleKey: LocalizedStringKey, destination: URL)
```

## Parameters

- `titleKey`: The key for the localized title that describes the purpose of this link.
- `destination`: The URL for the link.

## Discussion

Discussion Use 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/")!)

## See Also

### Creating a link

- [init(destination:label:)](swiftui/link/init(destination:label:).md)
