Hover Zoom
A copy-paste image effects component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Image EffectsHTMLCSSany framework
Copy into your project
HTML
<!-- Hover Zoom -->
<figure class="nuda-img-zoom">
<img class="nuda-img-zoom__img" src="/your-image.jpg" alt="" />
<figcaption class="nuda-img-zoom__cap">Hover me</figcaption>
</figure>CSS
/* Hover Zoom
Smooth, slow scale on hover with a brightness lift.
Customize: --zoom-scale, --zoom-duration */
.nuda-img-zoom {
--zoom-scale: 1.12;
--zoom-duration: 0.8s;
position: relative;
width: 100%;
aspect-ratio: 4 / 3;
border-radius: 12px;
overflow: hidden;
cursor: pointer;
margin: 0;
}
.nuda-img-zoom__img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
transform: scale(1);
transition:
transform var(--zoom-duration) cubic-bezier(0.4, 0, 0.2, 1),
filter 0.5s;
}
.nuda-img-zoom:hover .nuda-img-zoom__img {
transform: scale(var(--zoom-scale));
filter: brightness(1.1);
}
.nuda-img-zoom__cap {
position: absolute;
left: 10px;
bottom: 8px;
font: 700 0.75rem ui-sans-serif, system-ui, sans-serif;
color: #fafafa;
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
transform: translateY(2px);
opacity: 0.8;
transition: opacity 0.3s, transform 0.3s;
}
.nuda-img-zoom:hover .nuda-img-zoom__cap {
opacity: 1;
transform: translateY(0);
}How to use Hover Zoom
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.