<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ShareLink/init(item:subject:message:preview:label:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI9ShareLinkV4item7subject7message7preview5labelACys15CollectionOfOneVyqd__Gq_q0_q1_Gqd___AA4TextVSgAoA0C7PreviewVyq_q0_Gq1_yXEtcAKRsz16CoreTransferable0P0Rd__lufc"
  },
  "title" : "init(item:subject:message:preview:label:)"
}
-->

# init(item:subject:message:preview:label:)

Creates an instance that presents the share interface.

```
nonisolated init<I>(item: I, subject: Text? = nil, message: Text? = nil, preview: SharePreview<PreviewImage, PreviewIcon>, @ContentBuilder label: () -> Label) where Data == CollectionOfOne<I>, I : Transferable
```

## Parameters

`item`

The item to share.

`subject`

A title for the item to show when sharing to activities
that support a subject field.

`message`

A description of the item to show when sharing to
activities that support a message field. Activities may
support attributed text or HTML strings.

`preview`

A representation of the item to render in a preview.

`label`

A content builder that produces a label that describes the
share action.

---

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)