Link
A control for navigating to a URL
Platform Compatibility
iOS 14.0+ iPadOS 14.0+ macOS 11.0+ watchOS 7.0+ tvOS 14.0+ visionOS 1.0+
Tags
SwiftUI Code
Link("Explore SwiftUI",
destination: URL(string: "https://exploreswiftui.com")!)
.environment(\.openURL, OpenURLAction { url in
print("Open \(url)")
return .handled
})
Found an issue or have a suggestion?
Created: June 5, 2025Updated: June 5, 2025