Interactive previews iPhone
ShareLink
A view that controls a sharing presentation
Platform Compatibility
iOS 16.0+ iPadOS 16.0+ macOS 13.0+ watchOS 9.0+ visionOS 1.0+
Tags
SwiftUI Code
HStack {
ShareLink(item: URL(string: "https://exploreswiftui.com")!)
ShareLink("Explore SwiftUI", item: URL(string: "https://exploreswiftui.com")!)
.padding(.horizontal)
ShareLink(item: URL(string: "https://exploreswiftui.com")!) {
Label("Foo", systemImage: "cube.transparent")
}
}Found an issue or have a suggestion?
Created: June 5, 2025Updated: December 27, 2025
More Link Components
View allCustom Preview Item ShareLink
Creates an instance, with a custom label, that presents the share interface
Explore Other Components
Browse allOutline Group
A structure that computes views and disclosure groups on demand from an underlying collection of tree-structured, identified data.
SliderTickContentForEach
A type of slider content that creates content by iterating over a collection.
NavigationLinkPickerStyle
A picker style represented by a navigation link that presents the options by pushing a List-style picker view.