OAuth Buttons
A copy-paste login & auth component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Login & AuthHTMLCSSany framework
Copy into your project
HTML
<div class="nuda-oauth">
<button class="nuda-oauth__btn nuda-oauth__btn--google">
<svg viewBox="0 0 48 48"><!-- Google logo paths --></svg>
Continue with Google
</button>
<button class="nuda-oauth__btn nuda-oauth__btn--gh">
<svg viewBox="0 0 24 24" fill="currentColor"><!-- GitHub mark --></svg>
Continue with GitHub
</button>
</div>CSS
.nuda-oauth {
display: flex;
flex-direction: column;
gap: 8px;
width: 100%;
max-width: 280px;
}
.nuda-oauth__btn {
position: relative;
overflow: hidden;
display: inline-flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
background: rgba(255,255,255,.04);
border: 1px solid rgba(255,255,255,.08);
border-radius: 10px;
color: #fafafa;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: background .2s,border-color .2s,transform .15s;
}
.nuda-oauth__btn svg {
width: 16px;
height: 16px;
flex-shrink: 0;
transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.nuda-oauth__btn:hover {
background: rgba(255,255,255,.07);
border-color: rgba(255,255,255,.16);
transform: translateY(-1px);
}
.nuda-oauth__btn:hover svg {
transform: rotate(-12deg) scale(1.12);
}
.nuda-oauth__btn::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(120deg,transparent 30%,rgba(255,255,255,.08) 50%,transparent 70%);
transform: translateX(-100%);
transition: transform .6s;
}
.nuda-oauth__btn:hover::after {
transform: translateX(100%);
}
.nuda-oauth__btn--gh svg {
color: #fafafa;
}
@media (prefers-reduced-motion:reduce) {
.nuda-oauth__btn:hover svg {
transform: none;
}
.nuda-oauth__btn::after {
display: none;
}
}
How to use OAuth Buttons
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.