20 CSS Social Buttons
20 hand-coded CSS social buttons for blogs, SaaS marketing pages, e-commerce product pages, creator bio pages and support widgets. Covers share and follow controls, the Web Share API with a working fallback menu, prefilled intent URLs, live share counts, standalone sign-in button sets, Linktree-style link stacks and direct-message contact cards. Brand marks are inline SVG with no icon font and no external request. Scoped under .soc-NN for no-collision pasting, prefers-reduced-motion guarded, framework-agnostic.
Related34 CSS Floating Buttons25 CSS Footer Designs30 CSS Login Forms20 CSS Copy Buttons
Premium icon pickPartner: Nucleo
Affiliate linkNeed consistent icons around these buttons?
You just browsed 20 social buttons. Nucleo is a library of 44,000+ SVG icons in five matching families, so the icons across your UI share one style, with web, Mac and Windows apps to manage them. The All Icons Bundle is $149 with lifetime updates.
Nucleo. We may earn a commission, at no extra cost to you.
02. Social Button Hover with Brand Color Fill (opens in a new tab)
03. Accessible Circular Social Icon Buttons (opens in a new tab)
04. Social Icon Buttons with CSS Tooltips (opens in a new tab)
05. Staggered Social Icon Entrance Animation (opens in a new tab)
06. Web Share API Button with Fallback Menu (opens in a new tab)
07. Social Share Buttons with Intent URLs (opens in a new tab)
08. Share Button with Live Count Badge (opens in a new tab)
09. Copy Link Button with Copied Feedback (opens in a new tab)
10. Article Email and Print Action Bar (opens in a new tab)
11. Sign In with Google Apple GitHub Buttons (opens in a new tab)
12. Follow Button with Following Toggle (opens in a new tab)
13. Linktree Style Bio Page Link Buttons (opens in a new tab)
14. Product Share Row with Wishlist Compare (opens in a new tab)
15. WhatsApp Telegram Signal Contact Buttons (opens in a new tab)
16. Neumorphic Soft UI Social Buttons (opens in a new tab)
17. Glassmorphic Social Buttons over an Image (opens in a new tab)
18. Ghost Outline Social Buttons Brand Hover (opens in a new tab)
19. Gradient Social Buttons Animated Border (opens in a new tab)
20. Dark Mode Social Buttons CSS Variables (opens in a new tab)
Frequently asked questions
How do I add social media icons without Font Awesome?
fill="currentColor" and it inherits whatever colour the link already has, so hover and focus states need no extra rules. One caveat catches people: currentColor only inherits if the path does not hard-code its own fill, and most copied marks do, so strip any fill="#1DA1F2" from the path before wondering why your hover colour does nothing. Set the brand colour once as a custom property on each item — style="--brand:#0a66c2" — and a single shared rule can tint every channel differently. Mark the SVG aria-hidden="true" and put the accessible name on the link, or a screen reader announces nothing at all.Why are my icon-only social buttons inaccessible?
aria-label="Follow us on LinkedIn" on the link, or visually-hidden text inside it. Prefer the hidden text if you also want the label to survive translation tools, which sometimes skip attributes. The visually-hidden utility must use the clip-path pattern rather than display:none or visibility:hidden — both of those remove the element from the accessibility tree entirely, which is the opposite of what you want. The second common failure is size. An icon-only control is frequently drawn at 24px, but WCAG 2.5.8 asks for a 24px minimum and 44px is the practical target on touch; pad the link rather than scaling the glyph so the icon stays crisp while the hit area grows. Finally, never remove the focus ring without replacing it — outline:none on a social row is the single most common keyboard regression in this pattern.How does the Web Share API work and what is the fallback?
navigator.share({ title, text, url }) opens the operating system's own share sheet, which is why it feels native on mobile and why it can reach apps your page knows nothing about. It returns a promise, so wrap it in try/catch and treat a rejection as ordinary — a user dismissing the sheet rejects with an AbortError, which is not a failure worth reporting. Three constraints decide whether you can call it at all. It requires a secure context, so HTTPS or localhost. It requires a genuine user gesture, so calling it from a timer, on page load, or after an await that breaks the gesture chain will throw. And desktop support is uneven, so a fallback is not optional. Feature-detect with if (navigator.share) and fall back to your own menu of channel links built on intent URLs. Do not detect by user agent; the capability varies by browser and context, not by device class.What are social share intent URLs and how do I build them?
text and url, LinkedIn reads url, Facebook reads u, and Reddit reads title and url. Every value must be passed through encodeURIComponent separately — encoding the whole query string at once double-encodes the ampersands and the platform silently drops everything after the first parameter, which is the usual reason a share arrives with a title and no link. Two details matter for safety and behaviour. Any link with target="_blank" needs rel="noopener", or the opened page gets a reference to your window through window.opener and can navigate it. And if you open the composer with script instead of a link, pop-up blockers will stop the call unless it happens directly inside a click handler.How do I stop a share count badge from jittering?
font-variant-numeric: tabular-nums on the badge. By default most proportional fonts draw a 1 much narrower than a 0, so a counter ticking from 1,099 to 1,100 visibly reflows and the whole button twitches. Tabular figures give every digit the same advance width, so the number changes without the layout moving. Pair it with font-feature-settings: 'tnum' 1 if you need to cover older rendering paths. Two related traps show up in the same component. If you animate a pulse on increment by removing and re-adding a class in the same frame, the animation will not restart — the browser has not finished a style recalculation, so force a reflow or wait for the next requestAnimationFrame before re-adding. And if the count can grow by an order of magnitude, reserve the width with min-inline-size in ch units rather than letting the badge resize when the first four-digit number arrives.How do I build a follow button that toggles to Following?
data-state of idle or following on the button drives every visual difference through attribute selectors, and aria-pressed carries the same state to assistive technology so the change is announced rather than merely seen. The detail that separates a polished build from a janky one is width. Swapping the label with textContent resizes the button and shoves whatever sits next to it, so stack both labels in a single grid cell — grid-area: 1 / 1 on each — and crossfade opacity between them. The button then keeps one width for every state. Real products also show a destructive affordance: hovering Following reveals Unfollow in red. Declare that on :focus-visible as well as :hover, or the option simply does not exist for keyboard users. Keep the revert honest — if the network call fails, put the state back rather than leaving an optimistic Following that lies about what the server knows.Why does my glassmorphic or gradient-border social button render wrong?
backdrop-filter stops working when an ancestor combines overflow: hidden with a transform, because that ancestor creates a containing block the filter cannot sample through. Nothing errors; the blur just vanishes. Always declare a solid background first and add the glass behind @supports (backdrop-filter: blur(1px)), or unsupported browsers render near-invisible buttons over a photo. For an animated gradient border, the usual failure is that the rotation does nothing at all: a bare custom property is just a string to the browser, so it cannot be interpolated. Register it first with @property --angle declaring syntax: '<angle>', an initial value and inherits: false, and the same keyframes suddenly animate. The registration must sit at the top level of the stylesheet, not nested inside a selector block.How do these port to React, Vue, Svelte and Tailwind?
.soc-NN selector and custom property is framework-agnostic, and the fourteen pure-CSS demos need no JavaScript in any framework. Where behaviour exists, the shape is the same everywhere: one piece of state plus a small handler. In React a follow toggle is const [following, setFollowing] = useState(false) driving a data-state attribute, and any success-window timer must be cleared in the effect cleanup or a rapid re-click leaves a stale timeout that resets the label early. Vue uses a ref with onBeforeUnmount; Svelte a plain let and the cleanup returned from onMount. One trap is specific to server-rendered frameworks like Next and Nuxt: navigator.share and navigator.clipboard do not exist during the server pass, so feature-detect inside an effect or an event handler rather than in the component body, which would otherwise throw a reference error at build time. For Tailwind, the brand colour custom property survives as an arbitrary value and the states map to data-[state=following]: variants.Related collections
30 CSS Badges
30 hand-coded CSS badges for status indicators, notifications, membership tiers, live-data displays, and SEO / DevOps / financial dashboards — upload progress, typing indicator, transit line status, Core Web Vitals, ECG heartbeat, CI/CD build pipeline, countdown ring, live price ticker, keycap shortcut, wax seal, conference lanyard, and holographic collectibles. Copy-paste HTML and CSS, WCAG 2.2 accessible, MIT licensed.
20 CSS Banners & Alerts
20 hand-coded CSS banner and alert bars for e-commerce storefronts, SaaS dashboards, marketing sites, and compliance-bound products. Covers GDPR cookie consent with a real preferences panel, promo bars with countdown timers, free-shipping threshold progress, app-install smart banners, maintenance and incident status bars, newsletter signup bars, age verification gates, limited-stock urgency banners, live event announcements, browser upgrade notices, geo and currency switchers, sticky top announcement bars, bottom cookie bars, inline form validation alerts, icon-aligned alert banners, left-border accent alerts, diagonal stripe promos, full-width hero banners, animated gradient border alerts, and a text-wrapping laboratory that shows five strategies for the unbreakable string that breaks more banners than anything else. Every bar is scoped under a .ba-NN prefix for no-collision pasting, guards prefers-reduced-motion, carries the correct aria-live and role semantics, and ports unchanged to React, Vue, Svelte, Astro, Next.js and Tailwind.
25 CSS Blockquotes
25 CSS blockquotes for article pull quotes, testimonial cards, docs callout admonitions, statement banners, and social-post embeds. Covers giant decorative quotation marks, minimalist hairline and classic left borders, animated gradient and glowing neon borders, glassmorphism and aurora backgrounds, brutalist cards, speech bubbles, thick accent rails, highlighted mark text, newspaper multi-column layouts, an expandable read-more disclosure, a scroll-snap testimonial slider, and one-click copy.















