Scrub Thumbnail Preview
A copy-paste video player ui component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Video Player UIHTMLCSSany framework
Copy into your project
HTML
<!-- Scrub Thumbnail Preview — card floats above the thumb while hovering/scrubbing -->
<div class="nuda-vp2-thumb-preview">
<div class="nuda-vp2-thumb-preview__frame" aria-hidden="true"></div>
<div class="nuda-vp2-thumb-preview__scrubwrap">
<input
class="nuda-vp2-thumb-preview__range"
type="range" min="0" max="100" value="38"
aria-label="Seek" aria-valuetext="1:12 of 3:10"
/>
<div class="nuda-vp2-thumb-preview__card" style="left: 38%" aria-hidden="true">
<span class="nuda-vp2-thumb-preview__thumb"></span>
<span class="nuda-vp2-thumb-preview__time">1:12</span>
</div>
</div>
</div>CSS
.nuda-vp2-thumb-preview {
position: relative;
width: 300px;
height: 170px;
border-radius: 10px;
overflow: hidden;
background: linear-gradient(135deg,#1a1a1f,#0e0e10);
}
.nuda-vp2-thumb-preview__frame {
position: absolute;
inset: 0;
background: radial-gradient(circle at 30% 30%,rgba(228,255,84,.15),transparent 60%),linear-gradient(160deg,#1c1c22,#0a0a0c);
}
.nuda-vp2-thumb-preview__scrubwrap {
position: absolute;
left: 10px;
right: 10px;
bottom: 10px;
}
.nuda-vp2-thumb-preview__range {
appearance: none;
-webkit-appearance: none;
width: 100%;
height: 4px;
border-radius: 999px;
background: linear-gradient(90deg,#e4ff54 0 38%,rgba(255,255,255,.22) 38% 100%);
cursor: pointer;
outline: 0;
margin: 0;
position: relative;
z-index: 1;
}
.nuda-vp2-thumb-preview__range::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 12px;
height: 12px;
border-radius: 50%;
background: #fafafa;
border: 2px solid #e4ff54;
cursor: pointer;
}
.nuda-vp2-thumb-preview__range::-moz-range-thumb {
width: 12px;
height: 12px;
border-radius: 50%;
background: #fafafa;
border: 2px solid #e4ff54;
cursor: pointer;
}
.nuda-vp2-thumb-preview__card {
position: absolute;
bottom: 22px;
left: 38%;
transform: translateX(-50%) translateY(6px) scale(.9);
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
opacity: 0;
pointer-events: none;
transition: opacity .2s ease,transform .2s ease;
}
.nuda-vp2-thumb-preview__scrubwrap:hover .nuda-vp2-thumb-preview__card, .nuda-vp2-thumb-preview__range:focus-visible ~ .nuda-vp2-thumb-preview__card {
opacity: 1;
transform: translateX(-50%) translateY(0) scale(1);
}
.nuda-vp2-thumb-preview__thumb {
width: 64px;
height: 36px;
border-radius: 6px;
background: linear-gradient(135deg,#2a2a32,#151519);
border: 1px solid rgba(255,255,255,.15);
box-shadow: 0 6px 16px rgba(0,0,0,.5);
}
.nuda-vp2-thumb-preview__time {
font: 700 9px ui-monospace,monospace;
color: #fafafa;
background: rgba(0,0,0,.7);
padding: 2px 5px;
border-radius: 4px;
}
@media (prefers-reduced-motion:reduce) {
.nuda-vp2-thumb-preview__card {
transition: opacity .15s ease;
transform: translateX(-50%) translateY(0) scale(1);
}
.nuda-vp2-thumb-preview__scrubwrap:hover .nuda-vp2-thumb-preview__card, .nuda-vp2-thumb-preview__range:focus-visible ~ .nuda-vp2-thumb-preview__card {
transform: translateX(-50%) translateY(0) scale(1);
}
}
How to use Scrub Thumbnail Preview
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.