Share buttons are ignored. Users scroll right past them because they all look the same — a row of tiny icons that blend into the page.
I built a share button with dual-trigger logic that works differently on desktop and mobile — and it's completely free. 🎁
What I Built
Premium Multi-Interaction Social Share Button — a high-performance, interactive share component featuring:
✅ Dual-trigger logic — hover on desktop, click on mobile
✅ Outlined "SHARE" pill transforms into a filled blue button
✅ Social icons slide in smoothly (WhatsApp, Instagram, X, Facebook)
✅ Brand-specific hover animations on each icon
✅ Smooth sliding reveal effect
✅ Zero JavaScript — pure Tailwind CSS
✅ Fully responsive — optimized for all screen sizes
✅ Perfect for blog posts, articles, and product pages
See It in Action
The Design Breakdown
Dual-Trigger Logic
The clever part — on desktop, hovering the button triggers the social icons to reveal. On mobile, a tap triggers it. One component, two interaction patterns, zero JavaScript. Pure Tailwind CSS handles both with hover: and focus: utilities.
Outlined to Filled Transformation
The default state is a clean blue outlined pill with a share icon and "SHARE" text — minimal and unobtrusive. On interaction, it transforms into a solid filled blue pill with social icons — a complete visual transformation that demands attention.
Smooth Sliding Icons
WhatsApp, Instagram, X, and Facebook icons don't just appear — they slide in smoothly from the left. The staggered reveal makes the interaction feel polished and intentional.
Brand-Specific Hover Animations
Each social icon has its own hover animation — giving users tactile feedback on which platform they're about to share to. Small detail, big impact on user confidence.
Where to Use This
Blog posts — encourage readers to share content
Articles and tutorials — increase content distribution
Product pages — social proof through sharing
Portfolio projects — let visitors share your work
Landing pages — viral sharing mechanics
Get the Free Code
👉 Get the free code → Premium Multi-Interaction Social Share Button
No sign-up required. Copy, paste, ship. 🚀
What is CodeBar Library?
CodeBar Library is a growing collection of free and premium UI components built for developers who care about design quality.
Available tech stacks:
HTML/CSS
Tailwind CSS
React
Framer Motion
GSAP animations
Bootstrap
Everything is production-ready and copy-paste friendly. Whether you're building a portfolio, a SaaS product, or a client project — there's something for you.
What's Coming Next?
🔨 Full Stack Project Starter Kits
🎨 Premium UI Templates (Landing Pages, Dashboards)
⚡ More free Tailwind components every week
Drop a ❤️ if you found this useful and follow for more free components every week!
Using this in your project? Drop a link in the comments! 👇
→ Browse all free components at CodeBar Library
Top comments (0)