Skip to content

DNA Helix

A copy-paste loaders component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

LoadersHTMLCSSany framework

Copy into your project

HTML
<!-- DNA Helix Loader -->
<div class="nuda-dna-helix" role="status" aria-label="Loading">
  <span></span><span></span>
  <span></span><span></span>
  <span></span><span></span>
  <span></span><span></span>
</div>
CSS
/* DNA Helix Loader
   Dots moving in a double helix pattern (paired dots move inversely).
   Customize: --dna-color-a, --dna-color-b, --dna-dot-size */

.nuda-dna-helix {
  --dna-color-a: #818cf8;
  --dna-color-b: #f472b6;
  --dna-dot-size: 6px;
  display: flex;
  gap: 4px;
  align-items: center;
  height: 40px;
  padding: 8px;
}

.nuda-dna-helix span {
  width: var(--dna-dot-size);
  height: var(--dna-dot-size);
  border-radius: 50%;
  animation: nuda-dna-strand-a 1.6s ease-in-out infinite;
  will-change: transform, opacity;
}

.nuda-dna-helix span:nth-child(odd) { background: var(--dna-color-a); }
.nuda-dna-helix span:nth-child(even) { background: var(--dna-color-b); }

/* Pair delays — each pair offset by 0.2s */
.nuda-dna-helix span:nth-child(1) { animation-delay: 0s; }
.nuda-dna-helix span:nth-child(2) { animation-delay: 0s; animation-name: nuda-dna-strand-b; }
.nuda-dna-helix span:nth-child(3) { animation-delay: 0.2s; }
.nuda-dna-helix span:nth-child(4) { animation-delay: 0.2s; animation-name: nuda-dna-strand-b; }
.nuda-dna-helix span:nth-child(5) { animation-delay: 0.4s; }
.nuda-dna-helix span:nth-child(6) { animation-delay: 0.4s; animation-name: nuda-dna-strand-b; }
.nuda-dna-helix span:nth-child(7) { animation-delay: 0.6s; }
.nuda-dna-helix span:nth-child(8) { animation-delay: 0.6s; animation-name: nuda-dna-strand-b; }

@keyframes nuda-dna-strand-a {
  0%, 100% { transform: translateY(-12px) scale(1); opacity: 1; }
  50%      { transform: translateY(12px) scale(0.6); opacity: 0.4; }
}

@keyframes nuda-dna-strand-b {
  0%, 100% { transform: translateY(12px) scale(0.6); opacity: 0.4; }
  50%      { transform: translateY(-12px) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-dna-helix span {
    animation: none;
    opacity: 0.6;
    transform: none;
  }
}

How to use DNA Helix

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 loaders components

← Browse all NudaUI components