Lightbox Grow
A copy-paste image effects component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Image EffectsHTMLCSSany framework
Copy into your project
HTML
<!-- Lightbox Grow -->
<figure class="nuda-lightbox">
<img class="nuda-lightbox__img" src="/your-image.jpg" alt="" />
<span class="nuda-lightbox__icon" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
<path d="M8 3 L3 3 L3 8" />
<path d="M16 3 L21 3 L21 8" />
<path d="M8 21 L3 21 L3 16" />
<path d="M16 21 L21 21 L21 16" />
</svg>
</span>
</figure>CSS
/* Lightbox Grow
Card scales up with a glow shadow + an "expand" hint icon appears.
Pair with a real lightbox library on click.
Customize: --lb-glow */
.nuda-lightbox {
--lb-glow: rgba(228, 255, 84, 0.25);
position: relative;
width: 100%;
aspect-ratio: 1;
border-radius: 12px;
overflow: hidden;
margin: 0;
cursor: zoom-in;
transition:
transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
box-shadow 0.35s;
}
.nuda-lightbox:hover {
transform: scale(1.04);
box-shadow:
0 12px 40px -8px var(--lb-glow),
0 8px 16px -4px rgba(0, 0, 0, 0.4);
}
.nuda-lightbox__img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
transition:
transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
filter 0.35s;
}
.nuda-lightbox:hover .nuda-lightbox__img {
transform: scale(1.08);
filter: brightness(1.05) saturate(1.1);
}
.nuda-lightbox__icon {
position: absolute;
right: 10px;
top: 10px;
width: 26px;
height: 26px;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(4px);
border-radius: 6px;
color: #fafafa;
opacity: 0;
transform: scale(0.8);
transition: opacity 0.3s, transform 0.3s;
}
.nuda-lightbox__icon svg { width: 14px; height: 14px; }
.nuda-lightbox:hover .nuda-lightbox__icon {
opacity: 1;
transform: scale(1);
}How to use Lightbox Grow
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.