No Payment Method
A copy-paste empty states component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Empty StatesHTMLCSSany framework
No payment method
Add a card to enable billing
Copy into your project
HTML
<!-- No Payment Method -->
<div class="nuda-es2-payment" role="status" aria-label="No payment method">
<div class="nuda-es2-payment__scene" aria-hidden="true">
<svg class="nuda-es2-payment__card" viewBox="0 0 64 44" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="2" y="2" width="60" height="40" rx="6" />
<path d="M2 16 L62 16" />
<path d="M10 30 L26 30" opacity="0.5" />
</svg>
<span class="nuda-es2-payment__badge">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round">
<path d="M12 5 L12 19" />
<path d="M5 12 L19 12" />
</svg>
</span>
</div>
<h3 class="nuda-es2-payment__title">No payment method</h3>
<p class="nuda-es2-payment__sub">Add a card to enable billing</p>
<button class="nuda-es2-payment__cta" type="button">Add payment method</button>
</div>CSS
.nuda-es2-payment {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding: 20px;
text-align: center;
width: 100%;
max-width: 240px;
color: #8f8f98;
}
.nuda-es2-payment__scene {
position: relative;
width: 72px;
height: 50px;
}
.nuda-es2-payment__card {
width: 100%;
height: 100%;
color: currentColor;
filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
animation: nuda-es2-payment-sway 4.2s ease-in-out infinite;
transform-origin: 50% 100%;
}
.nuda-es2-payment__badge {
position: absolute;
right: -6px;
top: -6px;
width: 22px;
height: 22px;
border-radius: 50%;
background: #e4ff54;
color: #0a0a0a;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 0 10px rgba(228,255,84,.5);
animation: nuda-es2-payment-pulse 2.2s ease-in-out infinite;
}
.nuda-es2-payment__badge svg {
width: 12px;
height: 12px;
}
.nuda-es2-payment__title {
font: 600 13px ui-sans-serif,system-ui;
color: #fafafa;
margin: 0;
}
.nuda-es2-payment__sub {
font: 400 11px ui-sans-serif,system-ui;
color: #a0a0a8;
margin: 0;
}
.nuda-es2-payment__cta {
margin-top: 6px;
padding: 8px 16px;
background: #e4ff54;
color: #0a0a0a;
border: 0;
border-radius: 8px;
font: 600 11px ui-sans-serif,system-ui;
cursor: pointer;
transition: transform .15s ease,filter .2s ease;
min-height: 32px;
}
.nuda-es2-payment__cta:hover {
transform: translateY(-1px);
filter: brightness(1.08);
}
.nuda-es2-payment__cta:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
@keyframes nuda-es2-payment-sway {
0%,100% {
transform: rotateY(0deg) rotateZ(0deg);
}
50% {
transform: rotateY(10deg) rotateZ(-2deg);
}
}
@keyframes nuda-es2-payment-pulse {
0%,100% {
transform: scale(1);
}
50% {
transform: scale(1.15);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-es2-payment__card,.nuda-es2-payment__badge {
animation: none !important;
}
}
How to use No Payment Method
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.