--- title: useShare description: >- The useShare hook provides native sharing functionality through the Shop app's share sheet. api_name: shop-minis source_url: html: 'https://shopify.dev/docs/api/shop-minis/hooks/util/useshare' md: 'https://shopify.dev/docs/api/shop-minis/hooks/util/useshare.md' --- # useShare The `useShare` hook provides native sharing functionality through the Shop app's share sheet. Supports sharing text messages, titles, URLs (single or multiple), and custom content types. You can use this for user generated content sharing, product sharing, referral links, wishlists, or any social sharing features. ## use​Share() ### Returns * **UseShareReturns** ### UseShareReturns * share Generic Social Share ```ts (params: ShareParams) => Promise ``` * shareSingle Social Share for a single social medium ```ts (params: ShareSingleParams) => Promise ``` ### ShareParams * failOnCancel ```ts boolean ``` * message ```ts string ``` * title ```ts string ``` * type ```ts string ``` * url ```ts string ``` * urls ```ts string[] ``` ### ShareResponse * dismissedAction ```ts boolean ``` * message ```ts string ``` * success ```ts boolean ``` ### ShareSingleParams ```ts BaseShareSingleOptions | InstagramShareSingleOptions | FacebookShareSingleOptions ``` ### BaseShareSingleOptions * appId ```ts string ``` * email ```ts string ``` * filename ```ts string ``` * forceDialog ```ts boolean ``` * message ```ts string ``` * recipient ```ts string ``` * social ```ts Social.Facebook | Social.Pagesmanager | Social.Twitter | Social.Whatsapp | Social.Whatsappbusiness | Social.Instagram | Social.Googleplus | Social.Email | Social.Pinterest | Social.Linkedin | Social.Sms | Social.Telegram | Social.Snapchat | Social.Messenger | Social.Viber | Social.Discord ``` * subject ```ts string ``` * title ```ts string ``` * type ```ts string ``` * url ```ts string ``` * urls ```ts string[] ``` ### Social * Facebook ```ts facebook ``` * FacebookStories ```ts facebookstories ``` * Pagesmanager ```ts pagesmanager ``` * Twitter ```ts twitter ``` * Whatsapp ```ts whatsapp ``` * Whatsappbusiness ```ts whatsappbusiness ``` * Instagram ```ts instagram ``` * InstagramStories ```ts instagramstories ``` * Googleplus ```ts googleplus ``` * Email ```ts email ``` * Pinterest ```ts pinterest ``` * Linkedin ```ts linkedin ``` * Sms ```ts sms ``` * Telegram ```ts telegram ``` * Snapchat ```ts snapchat ``` * Messenger ```ts messenger ``` * Viber ```ts viber ``` * Discord ```ts discord ``` ### InstagramShareSingleOptions * appId ```ts string ``` * attributionURL ```ts string ``` * backgroundBottomColor ```ts string ``` * backgroundImage ```ts string ``` * backgroundTopColor ```ts string ``` * backgroundVideo ```ts string ``` * email ```ts string ``` * filename ```ts string ``` * forceDialog ```ts boolean ``` * linkText ```ts string ``` * linkUrl ```ts string ``` * message ```ts string ``` * recipient ```ts string ``` * social ```ts Social.InstagramStories ``` * stickerImage ```ts string ``` * subject ```ts string ``` * title ```ts string ``` * type ```ts string ``` * url ```ts string ``` * urls ```ts string[] ``` ### FacebookShareSingleOptions * appId ```ts string ``` * attributionURL ```ts string ``` * backgroundBottomColor ```ts string ``` * backgroundImage ```ts string ``` * backgroundTopColor ```ts string ``` * backgroundVideo ```ts string ``` * email ```ts string ``` * filename ```ts string ``` * forceDialog ```ts boolean ``` * linkText ```ts string ``` * linkUrl ```ts string ``` * message ```ts string ``` * recipient ```ts string ``` * social ```ts Social.FacebookStories ``` * stickerImage ```ts string ``` * subject ```ts string ``` * title ```ts string ``` * type ```ts string ``` * url ```ts string ``` * urls ```ts string[] ``` ### ShareSingleResponse * message ```ts string ``` * success ```ts boolean ``` Examples ### Examples * #### ##### tsx ```tsx import {useShare, Button} from '@shopify/shop-minis-react' export default function MyComponent() { const {share} = useShare() const handleShare = async () => { const result = await share({ title: 'Check out this product!', text: 'I found this amazing product on Shop', url: 'https://shop.app/products/123', }) console.log({shareResult: result}) } return } ``` ***