Interactive previews iPhone

Custom Preview Item ShareLink

Creates an instance, with a custom label, that presents the share interface

Custom Preview Item ShareLink  - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview

Platform Compatibility

iOS 16.0+ iPadOS 16.0+ macOS 13.0+ watchOS 9.0+ visionOS 1.0+

Tags

SwiftUI Code

Docs
ShareLink(
    "Share Cats",
    item: Image(.cats),
    subject: Text("Cool Photo"),
    message: Text("Check it out!"),
    preview: SharePreview(
        "Derpy Cats",
        image: Image(.cats)
    )
)

Found an issue or have a suggestion?

Created: June 5, 2025Updated: December 27, 2025

More Link Components

View all
HelpLink - macOS - Flat Design - Light Mode - Preview
initializer

HelpLink

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

TextFieldLink - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
initializer

TextFieldLink

A control that requests text input from the user when pressed

ShareLink - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

ShareLink

A view that controls a sharing presentation

Link - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Link

A control for navigating to a URL

Explore Other Components

Browse all
InlinePickerStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

InlinePickerStyle

A PickerStyle where each option is displayed inline with other views in the current container.

Toolbar Item Visibility Priority - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Toolbar Item Visibility Priority

Defines the visibility priority for a toolbar item.

Stepped Slider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Stepped Slider

Creates a slider to select a value from a given range, subject to a step increment

Sheet Placement - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview
modifier

Sheet Placement

Sets the placement of a presentation within the presenting view. This may fall back to center on small screens.

Picker Divider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
content

Picker Divider

A Picker with a Divider

NavigationSplitView - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

NavigationSplitView

Creates a two-column navigation split view.

SegmentedPickerStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

SegmentedPickerStyle

A picker style that presents the options in a segmented control. Use this style when there are two to five options. Consider using menu when there are more than five options.

Standard Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

Standard Colors

The SwiftUI standard colors