View Zoom Image
A copy-paste scroll-driven component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Scroll-DrivenHTMLCSSany framework
Scroll ↓
NUDA
VIEW
Copy into your project
HTML
<!-- Image zooms in then back out across its own visible duration -->
<div class="nuda-sd2-zoom__frame">
<img class="nuda-sd2-zoom__img" src="photo.jpg" alt="Zoom" />
</div>CSS
.nuda-sd2-zoom {
height: 160px;
border: 1px solid rgba(255,255,255,.08);
border-radius: 10px;
overflow: hidden;
background: #09090b;
}
.nuda-sd2-zoom__scroller {
height: 100%;
overflow: auto;
padding: .8rem;
display: flex;
flex-direction: column;
gap: .8rem;
}
.nuda-sd2-zoom__hint {
margin: 0;
color: #52525b;
font-size: .68rem;
text-align: center;
text-transform: uppercase;
letter-spacing: .08em;
}
.nuda-sd2-zoom__frame {
flex: 0 0 auto;
height: 96px;
border-radius: 10px;
overflow: hidden;
}
.nuda-sd2-zoom__img {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg,#1f2937,#e4ff54);
color: #09090b;
font-weight: 800;
letter-spacing: .15em;
transform: scale(1);
animation: nuda-sd2-zoom-in linear both;
animation-timeline: view();
animation-range: cover 0% cover 100%;
}
.nuda-sd2-zoom__img--b {
background: linear-gradient(135deg,#3b0764,#e4ff54);
}
@keyframes nuda-sd2-zoom-in {
50% {
transform: scale(1.2);
}
}
@supports not (animation-timeline:view()) {
.nuda-sd2-zoom__img {
transform: scale(1.08);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-sd2-zoom__img {
animation: none;
animation-timeline: none;
transform: scale(1);
}
}
How to use View Zoom Image
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.