Skip to content

Thumbnail Strip

A copy-paste galleries & carousels component in pure HTML, CSS & vanilla JS. Zero dependencies, framework-agnostic, MIT-licensed.

Galleries & CarouselsHTMLJavaScriptCSSany framework

Copy into your project

HTML
<div class="nuda-thumbs">
  <div class="nuda-thumbs__main"
       style="background: linear-gradient(135deg,#62b6ff,#9d6dff)"></div>
  <div class="nuda-thumbs__strip">
    <button class="nuda-thumbs__thumb" style="background:#ff5e7a"></button>
    <button class="nuda-thumbs__thumb" style="background:#ffb45e"></button>
    <button class="nuda-thumbs__thumb is-active" style="background:#62b6ff"></button>
    <!-- More thumbs -->
  </div>
</div>
JavaScript
const main   = document.querySelector('.nuda-thumbs__main');
const thumbs = document.querySelectorAll('.nuda-thumbs__thumb');

thumbs.forEach((t) => {
  t.addEventListener('click', () => {
    thumbs.forEach((x) => x.classList.remove('is-active'));
    t.classList.add('is-active');
    main.style.background = t.style.background;
  });
});
CSS
.nuda-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 240px;
}

.nuda-thumbs__main {
  height: 120px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  transition: background .35s;
}

.nuda-thumbs__strip {
  display: flex;
  gap: 6px;
}

.nuda-thumbs__thumb {
  flex: 1;
  height: 34px;
  border-radius: 7px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: .6;
  transition: opacity .25s,border-color .25s,transform .25s;
}

.nuda-thumbs__thumb:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.nuda-thumbs__thumb.is-active {
  opacity: 1;
  border-color: #e4ff54;
  box-shadow: 0 0 0 2px rgba(228,255,84,.2);
}

How to use Thumbnail Strip

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.

More galleries & carousels components

← Browse all NudaUI components