Vertical-to-Horizontal Drive
A copy-paste scroll-driven component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Scroll-DrivenHTMLCSSany framework
Scroll ↓ to pan →
Copy into your project
HTML
<!-- Vertical scroll of the top pane drives horizontal pan below,
via a named scroll-timeline-name + timeline-scope pairing -->
<div class="nuda-sd2-hdrive__scroller">…</div>
<div class="nuda-sd2-hdrive__track">
<div class="nuda-sd2-hdrive__row">
<span class="nuda-sd2-hdrive__chip">01</span>
<span class="nuda-sd2-hdrive__chip">02</span>
<span class="nuda-sd2-hdrive__chip">03</span>
</div>
</div>CSS
.nuda-sd2-hdrive {
height: 160px;
display: flex;
flex-direction: column;
border: 1px solid rgba(255,255,255,.08);
border-radius: 10px;
overflow: hidden;
background: #09090b;
timeline-scope: --sd2hdrive;
}
.nuda-sd2-hdrive__scroller {
flex: 1;
overflow-y: auto;
scroll-timeline-name: --sd2hdrive;
scroll-timeline-axis: block;
padding: .6rem;
}
.nuda-sd2-hdrive__spacer {
height: 70px;
}
.nuda-sd2-hdrive__hint {
margin: 0;
text-align: center;
color: #52525b;
font-size: .68rem;
text-transform: uppercase;
letter-spacing: .08em;
}
.nuda-sd2-hdrive__track {
height: 52px;
flex: 0 0 auto;
overflow: hidden;
border-top: 1px solid rgba(255,255,255,.08);
display: flex;
align-items: center;
}
.nuda-sd2-hdrive__row {
display: flex;
gap: .5rem;
padding: 0 .6rem;
animation: nuda-sd2-hdrive-pan linear;
animation-timeline: --sd2hdrive;
}
.nuda-sd2-hdrive__chip {
flex: 0 0 auto;
width: 40px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
background: rgba(228,255,84,.08);
border: 1px solid rgba(228,255,84,.2);
color: #e4ff54;
font-size: .7rem;
font-weight: 700;
}
@keyframes nuda-sd2-hdrive-pan {
from {
transform: translateX(0);
}
to {
transform: translateX(-160px);
}
}
@supports not (animation-timeline:scroll()) {
.nuda-sd2-hdrive__row {
transform: translateX(-80px);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-sd2-hdrive__row {
animation: none;
animation-timeline: none;
transform: translateX(0);
}
}
How to use Vertical-to-Horizontal Drive
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.