Are you building a blog, portfolio, or product site and want users to share your content on social media?
Instead of digging through outdated docs or guessing URL formats, I built a simple solution — a collection of ready-to-use social share URLs with corresponding icons (SVG, PNG, JPG).
Why install a full library when you only need to support two share services?
You don’t need a massive library just to add simple social sharing!
Keep it light skip the heavy libraries and just use simple share URLs.
You can check it out here.
👉 Github: https://github.com/dango0812/social-share-urls
The details documentation is still a work in progress!
💡 How to Use
// Example: Share on Twitter
const searchParams = new URLSearchParams({
url: "https://github.com/dango0812", // share url
text: "hello, world"
});
const shareUrl = `https://twitter.com/intent/tweet?${searchParams.toString()}`;
<a href={shareUrl} target="_blank" rel="noopener noreferrer">
twitter share!
</a>
Since each platform has different URL templates, we've organized them all in this project.
You can copy them and use them right away!
Top comments (0)