Tracking Transparency Prompt
A copy-paste cookie & consent component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Cookie & ConsentHTMLCSSany framework
Why we ask to track
- Personalize the content you see
- Measure which features are useful
- Detect fraud and keep accounts safe
Copy into your project
HTML
<div class="nuda-ck2-why-tracking" role="dialog" aria-modal="true" aria-labelledby="ck2-why-tracking-title">
<p id="ck2-why-tracking-title" class="nuda-ck2-why-tracking__title">Why we ask to track</p>
<ul class="nuda-ck2-why-tracking__list">
<li class="nuda-ck2-why-tracking__item">
<span class="nuda-ck2-why-tracking__dot" aria-hidden="true"></span>
Personalize the content you see
</li>
<li class="nuda-ck2-why-tracking__item">
<span class="nuda-ck2-why-tracking__dot" aria-hidden="true"></span>
Measure which features are useful
</li>
<li class="nuda-ck2-why-tracking__item">
<span class="nuda-ck2-why-tracking__dot" aria-hidden="true"></span>
Detect fraud and keep accounts safe
</li>
</ul>
<div class="nuda-ck2-why-tracking__actions">
<button type="button" class="nuda-ck2-why-tracking__btn nuda-ck2-why-tracking__btn--decline">Don't allow</button>
<button type="button" class="nuda-ck2-why-tracking__btn nuda-ck2-why-tracking__btn--allow">Allow tracking</button>
</div>
</div>CSS
.nuda-ck2-why-tracking {
width: 300px;
box-sizing: border-box;
background: #141414;
border: 1px solid rgba(255,255,255,.1);
border-radius: 16px;
padding: 1.1rem 1.2rem;
box-shadow: 0 25px 60px rgba(0,0,0,.6);
animation: _nuda-ck2whytrackingIn .45s cubic-bezier(.16,1,.3,1) both;
}
.nuda-ck2-why-tracking__title {
color: #fafafa;
font-size: .85rem;
font-weight: 700;
margin: 0 0 .7rem;
}
.nuda-ck2-why-tracking__list {
list-style: none;
margin: 0 0 1rem;
padding: 0;
display: flex;
flex-direction: column;
gap: .45rem;
}
.nuda-ck2-why-tracking__item {
display: flex;
align-items: center;
gap: .55rem;
color: #cfcfcf;
font-size: .71rem;
line-height: 1.4;
}
.nuda-ck2-why-tracking__dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #e4ff54;
flex-shrink: 0;
}
.nuda-ck2-why-tracking__actions {
display: flex;
gap: .5rem;
}
.nuda-ck2-why-tracking__btn {
flex: 1;
min-height: 44px;
border-radius: 9px;
font-size: .73rem;
font-weight: 700;
cursor: pointer;
transition: opacity .15s,transform .15s;
}
.nuda-ck2-why-tracking__btn:hover {
opacity: .85;
}
.nuda-ck2-why-tracking__btn:active {
transform: scale(.97);
}
.nuda-ck2-why-tracking__btn:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
.nuda-ck2-why-tracking__btn--decline {
background: rgba(255,255,255,.08);
color: #cfcfcf;
border: 1px solid rgba(255,255,255,.14);
}
.nuda-ck2-why-tracking__btn--allow {
background: #e4ff54;
color: #0a0a0a;
border: 1px solid transparent;
}
@keyframes _nuda-ck2whytrackingIn {
from {
opacity: 0;
transform: scale(.94);
}
to {
opacity: 1;
transform: scale(1);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-ck2-why-tracking {
animation: none !important;
}
}
How to use Tracking Transparency Prompt
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.