Skip to content

Slide-Up Banner

A copy-paste cookie & consent component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Cookie & ConsentHTMLCSSany framework

🍪 By continuing you agree to our use of cookies.

Copy into your project

HTML
<div class="nuda-ck-slideup">
  <div class="nuda-ck-slideup__stripe"></div>
  <div class="nuda-ck-slideup__content">
    <p class="nuda-ck-slideup__text">
      🍪 By continuing you agree to our use of cookies.
    </p>
    <div class="nuda-ck-slideup__actions">
      <button class="nuda-ck-slideup__btn nuda-ck-slideup__btn--reject">Reject</button>
      <button class="nuda-ck-slideup__btn nuda-ck-slideup__btn--ok">Got it</button>
    </div>
  </div>
</div>
CSS
.nuda-ck-slideup {
  background: #141414;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px 14px 0 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  animation: _nuda-ckslideup .5s cubic-bezier(.16,1,.3,1) both;
}

.nuda-ck-slideup__stripe {
  height: 3px;
  background: linear-gradient(90deg,#e4ff54,#a8ff54);
}

.nuda-ck-slideup__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
}

.nuda-ck-slideup__text {
  color: #cfcfcf;
  font-size: .75rem;
  margin: 0;
  flex: 1;
}

.nuda-ck-slideup__actions {
  display: flex;
  gap: .4rem;
  flex-shrink: 0;
}

.nuda-ck-slideup__btn {
  border: none;
  border-radius: 6px;
  padding: .35rem .75rem;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}

.nuda-ck-slideup__btn:hover {
  opacity: .8;
}

.nuda-ck-slideup__btn--reject {
  background: transparent;
  border: 1px solid rgba(255,255,255,.12);
  color: #777;
}

.nuda-ck-slideup__btn--ok {
  background: #e4ff54;
  color: #0a0a0a;
}

@keyframes _nuda-ckslideup {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-ck-slideup {
    animation: none;
  }
}

How to use Slide-Up Banner

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.

More cookie & consent components

← Browse all NudaUI components