# Share

{% embed url="<https://youtu.be/jttokrug3xY?si=BjVu4u5AbDu0O8XS>" %}

Watch this on Youtube: <https://www.youtube.com/watch?v=jttokrug3xY>

The **Share** action allows you to trigger the device's native share dialog, enabling users to share text-based content through installed apps such as messaging, email, or social media platforms.

***

#### 📦 Properties

| Property  | Type                | Required | Description                                      |
| --------- | ------------------- | -------- | ------------------------------------------------ |
| `message` | Expression (String) | ✅        | The text content to share                        |
| `subject` | Expression (String) | ❌        | Subject line (used by email and some other apps) |

***

#### 📱 Platform Behavior

| Platform                 | Behavior                                               |
| ------------------------ | ------------------------------------------------------ |
| **Mobile (iOS/Android)** | Opens native share sheet with available apps           |
| **Web**                  | Shows dialog explaining feature requires mobile device |
| **Desktop**              | Uses system share functionality where available        |

***

#### ✅ Common Use Cases

* Sharing referral codes, promo codes, or invite links
* Allowing users to share app content or achievements
* Promoting user-generated content through social channels
* Sharing contact information or business details
* Distributing links to articles, products, or resources

***

#### ⚙️ Default Behavior

By default:

| Behavior               | Description                                               |
| ---------------------- | --------------------------------------------------------- |
| **Platform Support**   | Uses native share sheet on mobile devices                 |
| **Web Behavior**       | Shows informational dialog (sharing not supported on web) |
| **Content Validation** | Requires non-empty message to proceed                     |
| **App Selection**      | User chooses destination app from available options       |

***

#### 🛠️ How to Use

<figure><img src="https://3626461507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbhApDTL7kHrXte2TTtjs%2Fuploads%2Fgit-blob-782baae9d1518b558f1acbf353d6701253f90b32%2Fshare_action.png?alt=media" alt="Copy Slugs"><figcaption><p>Copy Slug</p></figcaption></figure>

1. Add the action to a widget event (e.g., share button, social media icon)
2. Choose **Share** from the action list
3. Set the `message` property with the content to share
4. Optionally add a `subject` for email sharing

***
