> ## Documentation Index
> Fetch the complete documentation index at: https://docs.median.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompt share dialog

> Open the native iOS and Android share dialog from your website with the JavaScript Bridge to share a URL and optional text.

Use the Median JavaScript Bridge to trigger the native share dialog on Android and iOS. This feature allows you to share a URL and optional message using your device's built-in sharing options.

You can call this method from your app's JavaScript context, including within native tab menus and sidebars.

> [!TIP]
>
> **Developer Demo**
>
> Display our demo page in your app to test during development [https://median.dev/share-function](https://median.dev/share-function).

## Implementation guide

The `median.share.sharePage()` is available with the following parameters.

To open the native share dialog, call:

Median JavaScript Bridge

```javascript JavaScript  theme={null}
median.share.sharePage(); 
```

You may also use the following to share a URL other than the current URL:

Median JavaScript Bridge

```javascript JavaScript theme={null}
median.share.sharePage({url: 'https://median.co/about'});
```

You may also add some text which will be also shared along with the URL that you pass or the current URL:

Median JavaScript Bridge

```javascript JavaScript theme={null}
median.share.sharePage({url: 'https://median.co/about', text: 'Visit Median here'});
```

## Native share dialog preview

The appearance of the share dialog and the available sharing options depend on the apps and services installed on the user's device. Simulators may show limited options due to system restrictions.

| iOS | Android |
| :-: | :-: |
| ![Native share dialog on iOS](https://mintcdn.com/median-co/7LCOHMhgIef7ewYE/images/docs/73369de-iOS-PromptShare.png?fit=max\&auto=format\&n=7LCOHMhgIef7ewYE\&q=85\&s=af6badcfc1745da4f38974ef9c783111) | ![Native share dialog on Android](https://mintcdn.com/median-co/7LCOHMhgIef7ewYE/images/docs/76fab45-Android-PromptShare.png?fit=max\&auto=format\&n=7LCOHMhgIef7ewYE\&q=85\&s=3f8ff5540bb76dcd7b6c6210e0faa5bc) |


## Related topics

- [Managing permissions and consent](https://docs.median.co/docs/user-consent-management.md)
- [Download file](https://docs.median.co/docs/download-file.md)
- [Social share overview](https://docs.median.co/docs/social-share.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.