0.0.7 • Published 3 months ago

dv-social-share v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

dv-social-share


Social media share buttons for your next React.js, Next.js apps.

🎁 Features


  • Zero dependencies
  • Share buttons for your next React.js & Next.js app
    • Buffer
    • Digg
    • Email
    • Facebook Messanger
    • Facebook
    • FlipboardShare
    • GAB
    • HackerNews
    • Instapaper
    • Line
    • LinkedIn
    • LiveJournal
    • Pinterest
    • Pocket
    • Reddit
    • Refind
    • Skype
    • Telegram
    • Threads
    • Trello
    • Tumblr
    • Twitter
    • VK
    • WhatsApp
    • Yummly

Demo


to View Demo, please Click here


⚙ Install


dv-social-share is available on npm. It can be installed with the either following command:

npm install dv-social-share --save

or

yarn add dv-social-share --save

💡 Usage


BufferShare

👨‍💻 Code

import { BufferShareBtn } from 'dv-social-share'

<BufferShareBtn url="https://dv-social-share.vercel.app" title="Dhaval Vira" />

📖 BufferShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
titlestringthe Title to be shared.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

DiggShare

👨‍💻 Code

import { DiggShareBtn } from 'dv-social-share'

<DiggShareBtn url="https://dv-social-share.vercel.app" title="Dhaval Vira" />

📖 DiggShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
titlestringthe Title to be shared.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

EmailShare

👨‍💻 Code

import { EmailShareBtn } from 'dv-social-share'

<EmailShareBtn url="https://dv-social-share.vercel.app" />

📖 EmailShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
subjectstringA subject to be shared.
bodystringBody to be shared.
separatorstring::
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

FBMessangerShare

👨‍💻 Code

import { FBMessangerShareBtn } from 'dv-social-share'

<FBMessangerShareBtn url="https://dv-social-share.vercel.app" appId="" />

📖 FBMessangerShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
appIdstringFacebook application id.
redirectUristringThe URL to redirect to after sharing (default: the shared url).
tostringA user ID of a recipient. Once the dialog comes up, the sender can specify additional people as recipients.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

FBShare

👨‍💻 Code

import { FBShareBtn } from 'dv-social-share'

<FBShareBtn url="https://dv-social-share.vercel.app" quote="dv-social-share is a social share buttons for your next React.js & Next.js apps." hashTag="#dvsocialshare" />

📖 FBShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
quotestringA quote to be shared.
hashTagstringHashtag to be shared.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

FlipboardShare

👨‍💻 Code

import { FlipboardShareBtn } from 'dv-social-share'

<FlipboardShareBtn url="https://dv-social-share.vercel.app" title="Dhaval Vira" />

📖 FlipboardShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
titlestringthe Title to be shared.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

GABShare

👨‍💻 Code

import { GABShareBtn } from 'dv-social-share'

<GABShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 GABShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
titlestringTitle of the shared page.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

HackerNewsShare

👨‍💻 Code

import { HackerNewsShareBtn } from 'dv-social-share'

<HackerNewsShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 HackerNewsShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
titlestringTitle of the shared page.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

InstapaperShare

👨‍💻 Code

import { InstapaperShareBtn } from 'dv-social-share'

<InstapaperShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 InstapaperShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
titlestringTitle of the shared page.
descriptionstringDescription to be shared.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

LineShare

👨‍💻 Code

import { LineShareBtn } from 'dv-social-share'

<LineShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 LineShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
titlestringTitle of the shared page.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

LinkedInShare

👨‍💻 Code

import { LinkedInShareBtn } from 'dv-social-share'

<LinkedInShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 LinkedInShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
titlestringTitle of the shared page.
summarystringSummary of the shared page.
sourcestringSource of the shared page.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

LiveJournalShare

👨‍💻 Code

import { LiveJournalShareBtn } from 'dv-social-share'

<LiveJournalShareBtn url="https://dv-social-share.vercel.app" title="Dhaval Vira" />

📖 LiveJournalShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the page to be shared.
titlestringthe Title to be shared.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

PinboardShare

👨‍💻 Code

import { PinboardShareBtn } from 'dv-social-share'

<PinboardShareBtn url="https://dv-social-share.vercel.app" title="Dhaval Vira" descriptin="descriptino to be shared" />

📖 PinboardShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the to be page.
titlestringThe Title of the Page to be shared.
descriptionstringThe description to be shared.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

PinterestShare

👨‍💻 Code

import { PinterestShareBtn } from 'dv-social-share'

<PinterestShareBtn url="https://dv-social-share.vercel.app" media="https://dv-social-share.vercel.app/image.svg" />

📖 PinterestShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the to be page.
mediastringThe image URL that will be pinned.
descriptionstringThe description of the shared media.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

PocketShare

👨‍💻 Code

import { PocketShareBtn } from 'dv-social-share'

<PocketShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 PocketShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the to be page.
titlestringTitle of the shared page.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

RedditShare

👨‍💻 Code

import { RedditShareBtn } from 'dv-social-share'

<RedditShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 RedditShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the to be page.
titlestringTitle of the shared page.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

RefindShare

👨‍💻 Code

import { RefindShareBtn } from 'dv-social-share'

<RefindShareBtn url="https://dv-social-share.vercel.app" />

📖 RefindShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the to be page.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

SkypeShare

👨‍💻 Code

import { SkypeShareBtn } from 'dv-social-share'

<SkypeShareBtn url="https://dv-social-share.vercel.app" title='Dhaval" />

📖 SkypeShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the to be page.
titlestringThe title to be shared.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

TelegramShare

👨‍💻 Code

import { TelegramShareBtn } from 'dv-social-share'

<TelegramShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 TelegramShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the to be page.
titlestringTitle of the shared page.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

TrelloShare

👨‍💻 Code

import { TrelloShareBtn } from 'dv-social-share'

<TrelloShareBtn url="https://dv-social-share.vercel.app" desc="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 TrelloShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the to be page.
descstringDescription of the shared page.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

ThreadsShare

👨‍💻 Code

import { ThreadsShareBtn } from 'dv-social-share'

<ThreadsShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 ThreadsShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the to be page.
titlestringDescription of the shared page.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

TumblrShare

👨‍💻 Code

import { TumblrShareBtn } from 'dv-social-share'

<TumblrShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 TumblrShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the shared page to be shared.
titlestringThe title of the shared page.
tagsArray
captionstringThe description of the shared page.
posttypestringlink
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

TwitterShare

👨‍💻 Code

import { TwitterShareBtn } from 'dv-social-share'

<TwitterShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 TwitterShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the shared page to be shared.
titlestringThe title of the shared page.
viastring
hashtagsarray
relatedarray
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

VKShare

👨‍💻 Code

import { VKShareBtn } from 'dv-social-share'

<VKShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 VKShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the shared pageto be shared.
titlestringThe title of the shared page.
imagestringAn absolute link to the image that will be shared.
noParsebooleanIf true is passed, VK will not retrieve URL information.
noVkLinksbooleanIf true is passed, there will be no links to the user's profile in the open window. Only for mobile devices.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

WhatsAppShare

👨‍💻 Code

import { WhatsAppShareBtn } from 'dv-social-share'

<WhatsAppShareBtn url="https://dv-social-share.vercel.app" title="dv-social-share is a social share buttons for your next React.js & Next.js apps." />

📖 WhatsAppShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the shared page to be shared.
titlestringThe title of the shared page.
separatorstring
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

YummlyShare

👨‍💻 Code

import { YummlyShareBtn } from 'dv-social-share'

<YummlyShareBtn 
    url="https://dv-social-share.vercel.app" 
    title="dv-social-share is a social share buttons for your next React.js & Next.js apps." 
    image='url-of-image' 
/>

📖 YummlyShareBtn Props

PropsTypeDefaultDescriptionRequired
urlstringThe URL of the shared page to be shared.
titlestringThe title of the shared page.
imagestringThe Link of the Image to be shared along.
openInNewTabbooleanfalseOpen share window in a new tab if set to true.
imgConfigobjectA imgConfig contains width (number; e.g. 32/64), height (number; e.g. 32/64) & bgColor (string; e.g. '#FF0000') for the Image

💖 Wrap Up

If you think any of the dv-social-share can be improved, please do open a PR with any updates and submit any issues. Also, I will continue to improve this, so you might want to watch/star this repository to revisit.

🌟 Contribution

We'd love to have your helping hand on contributions to dv-social-share by forking and sending a pull request!

Your contributions are welcome.

How to contribute:

  • Fork the dv-social-share Repo
  • Create a New Branch from main
  • Push the Code in your branc and
  • Open pull request with improvements & more information on it
  • Discuss ideas in issues
  • Spread the word
  • Reach out with any feedback

⚖️ License

The MIT License License: MIT