Lightbox Open
A copy-paste galleries & carousels component in pure HTML, CSS & vanilla JS. Zero dependencies, framework-agnostic, MIT-licensed.
Galleries & CarouselsHTMLJavaScriptCSSany framework
Copy into your project
HTML
<div class="nuda-lboxwrap">
<div class="nuda-lboxwrap__thumb"></div>
<div class="nuda-lboxwrap__overlay">
<div class="nuda-lboxwrap__big"></div>
</div>
</div>JavaScript
const wrap = document.querySelector('.nuda-lboxwrap');
const thumb = wrap.querySelector('.nuda-lboxwrap__thumb');
const overlay = wrap.querySelector('.nuda-lboxwrap__overlay');
thumb.addEventListener('click', () => wrap.classList.add('is-open'));
overlay.addEventListener('click', () => wrap.classList.remove('is-open'));CSS
.nuda-lboxwrap {
position: relative;
width: 100%;
max-width: 200px;
height: 160px;
border-radius: 12px;
overflow: hidden;
background: #09090b;
}
.nuda-lboxwrap__thumb {
position: absolute;
left: 10px;
top: 10px;
width: 60px;
height: 60px;
border-radius: 8px;
background: linear-gradient(135deg,#9d6dff,#ff6dd4);
transition: transform .35s,opacity .35s;
}
.nuda-lboxwrap__overlay {
position: absolute;
inset: 0;
background: rgba(0,0,0,.7);
backdrop-filter: blur(6px);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity .35s ease;
pointer-events: none;
}
.nuda-lboxwrap__big {
width: 80px;
height: 80px;
border-radius: 12px;
background: linear-gradient(135deg,#9d6dff,#ff6dd4);
transform: scale(.5);
transition: transform .55s cubic-bezier(.16,1,.3,1);
box-shadow: 0 24px 48px -12px rgba(0,0,0,.6);
}
.nuda-lboxwrap.is-open .nuda-lboxwrap__thumb {
transform: scale(.85);
opacity: .3;
}
.nuda-lboxwrap.is-open .nuda-lboxwrap__overlay {
opacity: 1;
pointer-events: auto;
}
.nuda-lboxwrap.is-open .nuda-lboxwrap__big {
transform: scale(1);
}
How to use Lightbox Open
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.