Bottom Bar
A copy-paste cookie & consent component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Cookie & ConsentHTMLCSSany framework
Copy into your project
HTML
<div class="nuda-ck-bar">
<div class="nuda-ck-bar__left">
<span class="nuda-ck-bar__icon">🍪</span>
<p class="nuda-ck-bar__text">
We use cookies to improve your experience.
<a class="nuda-ck-bar__link" href="#">Learn more</a>
</p>
</div>
<div class="nuda-ck-bar__actions">
<button class="nuda-ck-bar__btn nuda-ck-bar__btn--ghost">Decline</button>
<button class="nuda-ck-bar__btn nuda-ck-bar__btn--accent">Accept</button>
</div>
</div>CSS
.nuda-ck-bar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
background: #1a1a1a;
border-top: 1px solid rgba(255,255,255,.1);
padding: .75rem 1.25rem;
width: 100%;
box-sizing: border-box;
animation: _nuda-ckbarUp .4s ease-out;
}
.nuda-ck-bar__left {
display: flex;
align-items: center;
gap: .6rem;
flex: 1;
min-width: 0;
}
.nuda-ck-bar__icon {
font-size: 1.1rem;
flex-shrink: 0;
}
.nuda-ck-bar__text {
color: #cfcfcf;
font-size: .75rem;
margin: 0;
line-height: 1.4;
}
.nuda-ck-bar__link {
color: #e4ff54;
text-decoration: none;
}
.nuda-ck-bar__link:hover {
text-decoration: underline;
}
.nuda-ck-bar__actions {
display: flex;
gap: .5rem;
flex-shrink: 0;
}
.nuda-ck-bar__btn {
border: none;
border-radius: 6px;
padding: .4rem .9rem;
font-size: .75rem;
font-weight: 600;
cursor: pointer;
transition: opacity .15s;
}
.nuda-ck-bar__btn:hover {
opacity: .8;
}
.nuda-ck-bar__btn--ghost {
background: transparent;
border: 1px solid rgba(255,255,255,.15);
color: #cfcfcf;
}
.nuda-ck-bar__btn--accent {
background: #e4ff54;
color: #0a0a0a;
}
@keyframes _nuda-ckbarUp {
from {
opacity: 0;
transform: translateY(100%);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-ck-bar {
animation: none;
}
}
How to use Bottom Bar
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.