Skip to content

Reopen Consent Pill

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-ck2-reopen-pill" role="region" aria-label="Cookie preferences shortcut">
  <button type="button" class="nuda-ck2-reopen-pill__btn" aria-haspopup="dialog">
    <span class="nuda-ck2-reopen-pill__ring" aria-hidden="true"></span>
    <svg class="nuda-ck2-reopen-pill__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"
         stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" width="15" height="15" aria-hidden="true">
      <circle cx="12" cy="12" r="9" />
      <circle cx="9" cy="10" r="1" fill="currentColor" stroke="none" />
      <circle cx="14" cy="9" r="1" fill="currentColor" stroke="none" />
      <circle cx="15" cy="14" r="1" fill="currentColor" stroke="none" />
      <circle cx="10" cy="15" r="1" fill="currentColor" stroke="none" />
    </svg>
    <span class="nuda-ck2-reopen-pill__label">Cookie settings</span>
  </button>
</div>
CSS
.nuda-ck2-reopen-pill {
  display: inline-flex;
}

.nuda-ck2-reopen-pill__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  background: #161616;
  border: 1px solid rgba(255,255,255,.12);
  color: #cfcfcf;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  transition: border-color .15s,color .15s;
}

.nuda-ck2-reopen-pill__btn:hover {
  color: #fafafa;
  border-color: rgba(255,255,255,.22);
}

.nuda-ck2-reopen-pill__btn:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

.nuda-ck2-reopen-pill__ring {
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  border: 1px solid rgba(228,255,84,.5);
  opacity: 0;
  animation: _nuda-ck2reopenpillRing 2.6s ease-out infinite;
  pointer-events: none;
}

.nuda-ck2-reopen-pill__icon {
  color: #e4ff54;
  flex-shrink: 0;
}

.nuda-ck2-reopen-pill__label {
  white-space: nowrap;
}

@keyframes _nuda-ck2reopenpillRing {
  0% {
    opacity: .6;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-ck2-reopen-pill__ring {
    animation: none !important;
    opacity: 0;
  }
}

How to use Reopen Consent Pill

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