Spotlight Cutout
A copy-paste onboarding & coachmarks component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Onboarding & CoachmarksHTMLCSSany framework
Save
Copy into your project
HTML
<!-- Spotlight Cutout — dim everything except a target element -->
<div class="nuda-spot">
<!-- Your page content here -->
<button class="nuda-spot__btn">Save</button>
<!-- Overlay with a hole punched at the target -->
<div class="nuda-spot__bg"></div>
<div class="nuda-spot__hole"></div>
</div>CSS
.nuda-spot {
position: relative;
width: 130px;
height: 90px;
background: linear-gradient(135deg,#1a1a1f,#0e0e10);
border-radius: 8px;
overflow: hidden;
}
.nuda-spot__bg {
position: absolute;
inset: 0;
background: rgba(0,0,0,.7);
backdrop-filter: blur(2px);
-webkit-mask: radial-gradient(circle 22px at 65% 50%,transparent 18px,black 22px);
mask: radial-gradient(circle 22px at 65% 50%,transparent 18px,black 22px);
}
.nuda-spot__hole {
position: absolute;
left: 65%;
top: 50%;
width: 44px;
height: 44px;
border: 2px solid #e4ff54;
border-radius: 8px;
transform: translate(-50%,-50%);
box-shadow: 0 0 20px rgba(228,255,84,.4);
animation: _sp-pulse 2s ease-in-out infinite;
}
.nuda-spot__btn {
position: absolute;
left: 65%;
top: 50%;
transform: translate(-50%,-50%);
padding: 4px 10px;
background: #e4ff54;
color: #09090b;
font: 700 9px ui-sans-serif,system-ui;
border-radius: 5px;
pointer-events: none;
}
@keyframes _sp-pulse {
0%,100% {
box-shadow: 0 0 12px rgba(228,255,84,.3);
}
50% {
box-shadow: 0 0 24px rgba(228,255,84,.6);
}
}
How to use Spotlight Cutout
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.