Social Login Buttons

Tailwind social login buttons: copy-paste Google, GitHub, and Facebook sign-in rows with brand icons.

Tailwind CSS
<div class="w-full max-w-sm space-y-3">
  <button class="w-full flex items-center justify-center gap-3 px-4 py-2.5 rounded-xl border border-slate-300 bg-white text-sm font-semibold text-slate-700 hover:bg-slate-50 hover:border-slate-400 transition-colors">
    <svg class="w-5 h-5" viewBox="0 0 24 24"><path fill="#4285F4" d="M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"/><path fill="#34A853" d="M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09C3.26 21.3 7.31 24 12 24z"/><path fill="#FBBC05" d="M5.27 14.29c-.25-.72-.38-1.49-.38-2.29s.14-1.57.38-2.29V6.62H1.29C.47 8.24 0 10.06 0 12s.47 3.76 1.29 5.38l3.98-3.09z"/><path fill="#EA4335" d="M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.7 1.29 6.62l3.98 3.09C6.22 6.86 8.87 4.75 12 4.75z"/></svg>
    Continue with Google
  </button>
  <button class="w-full flex items-center justify-center gap-3 px-4 py-2.5 rounded-xl border border-slate-300 bg-white text-sm font-semibold text-slate-700 hover:bg-slate-50 hover:border-slate-400 transition-colors">
    <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>
    Continue with GitHub
  </button>
  <button class="w-full flex items-center justify-center gap-3 px-4 py-2.5 rounded-xl border border-slate-300 bg-white text-sm font-semibold text-slate-700 hover:bg-slate-50 hover:border-slate-400 transition-colors">
    <svg class="w-5 h-5" fill="#1877F2" viewBox="0 0 24 24"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>
    Continue with Facebook
  </button>
</div>

Free to use in personal and commercial projects. No attribution required.

Variants

Same component, different looks. Preview each one live and copy the code you like.

Dark

Matches dark login cards and dashboards without a jarring white block.

Tailwind CSS

Brand filled

Each button wears its brand color, best for playful consumer products.

Tailwind CSS

Icon only

Compact row of icon buttons for tight spaces like modals and drawers.

Tailwind CSS

About this social login buttons

Tailwind social login buttons are the familiar continue-with rows you see on every modern signup page. They let visitors authenticate with an existing account instead of inventing another password, which is why almost every SaaS signup page offers at least Google and GitHub.

Each google login button tailwind row is a full-width flex button: a brand SVG glyph, a gap, and a semibold label. The white background with a slate border is the industry standard, and the hover state darkens the border slightly for feedback. Keep the label verb consistent across rows so the options scan as one group.

Order the buttons by audience: developer tools lead with GitHub, consumer apps lead with Google. Never invent your own brand-colored backgrounds for these rows; the neutral white row with the real brand glyph is what users recognize and trust. These buttons are UI only, so wire each one to your OAuth provider separately.

Every password a signup form demands is a small reason to leave. Visitors already juggle dozens of accounts, and inventing one more, plus proving they are human, is where signups quietly die. Social login buttons remove that whole negotiation: one click, one familiar consent screen, done. They also borrow trust, since the Google or GitHub button carries the credibility of the platform behind it.

Each row is a full-width flex button: brand SVG glyph, a gap, and a semibold label like Continue with Google. The rows stay white with a slate border because that neutral frame is what users recognize from a thousand login pages. Keeping the label verb identical across rows makes the options scan as one group instead of competing buttons. The buttons are presentation only; each one fires your OAuth flow separately.

Keep a Continue with email option visible below the social rows, styled quieter; some users have no social accounts and hiding email feels like a wall. Never nest the OAuth call inside an async callback without a direct user gesture; popup blockers eat it and the button appears broken. After failed auth, land back on the login form with the error shown inline, not on a blank error page. If you detect a returning user, highlight their last-used provider; one less decision every login.

The expensive mistake is triggering the OAuth popup from an async callback instead of the direct click. Browsers treat popups opened outside a user gesture as suspicious and block them, so the login silently fails for a chunk of visitors. Always start the OAuth redirect synchronously inside the click handler. If your flow needs an async step first, do it before the click, never between the click and the popup.

Where to use it

  • ✓ SaaS signup and login pages
  • ✓ Developer tools (GitHub first)
  • ✓ Consumer mobile web apps
  • ✓ Admin dashboards with SSO options

Customization tips

Add Apple or Microsoft rows with the same structure. For dark mode, switch the row to bg-slate-900 with a slate-700 border. If you only offer one provider, a single prominent button beats a lonely list.

Design notes

When to use

Social login buttons belong on signup and login pages where they remove the biggest friction: inventing and remembering another password. Offering Google and GitHub covers most developer and general audiences, and familiar brand icons make the options scannable in a second. They work best alongside, not instead of, an email option.

What to avoid

Do not offer only social login with no email fallback, because you lock out everyone without those accounts. Avoid listing six providers, since choice paralysis sets in after three or four. And do not surprise users by requesting broad permissions at login, because the permission screen is where signups die.

Accessibility

Give each button a real text label like Continue with Google rather than relying on the icon alone, and keep visible focus states on every row. Do not communicate the provider by brand color only.

Frequently asked questions

How do I make a Google login button in Tailwind?

Build a full-width flex button with border, rounded-xl, and padding, then place the multicolor Google G SVG before the label Continue with Google. Keep the row white with a slate border for the standard look.

Should social login buttons use brand colors as backgrounds?

No. The recognized pattern is a neutral white row with the brand glyph in brand colors. Full brand-color backgrounds make the options harder to scan and can look like ads.

Do these buttons handle the OAuth flow by themselves?

No, they are presentation only. Connect each button to your auth provider (Auth.js, Supabase Auth, Clerk, or your own OAuth endpoints) to start the real sign-in flow.

How do I make circular social login icon buttons?

Use w-12 h-12 rounded-full buttons with the brand SVG centered inside at about 20 to 24 pixels. Circular icon-only buttons work well in compact login forms where full-width buttons would feel heavy. Give each button an aria-label like "Sign in with Google" since there is no visible text.

Do social login buttons need the official brand logo SVG?

Yes, recognizable brand marks are what make users trust the button. Use the official monochrome or color SVG for each provider rather than a generic icon. Keep the logo at a consistent size across all buttons so no provider looks more prominent than the others.

Should the Sign in with Google button follow Google's branding guidelines?

Yes. Google publishes official button guidelines covering the white background, font, and spacing, and matching them reduces user suspicion of phishing. Deviating too far, like recoloring the G logo, can make cautious users abandon the login. When in doubt, use their exact specs.

Customize it with our tools