Skip to content

Cross-Container Transfer

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

Drag & DropHTMLCSSany framework

Drag a card to another column, or focus it and press Alt plus Arrow Right to move it forward a column.

Backlog
In Progress
Bug fix

Copy into your project

HTML
<!-- Cross-Container Transfer — the ghost slot marks the drop target in
     the destination column while the card visually flies over. Keyboard:
     focus the card, Alt+ArrowRight/ArrowLeft moves it between columns. -->
<div class="nuda-dd2-cross-transfer">
  <p id="dd2-cross-transfer-desc" class="nuda-dd2-cross-transfer__sr">Drag a card to another column, or focus it and press Alt plus Arrow Right to move it forward a column.</p>
  <div class="nuda-dd2-cross-transfer__board" role="group" aria-label="Task board" aria-describedby="dd2-cross-transfer-desc">
    <div class="nuda-dd2-cross-transfer__col">
      <span class="nuda-dd2-cross-transfer__colname">Backlog</span>
      <div class="nuda-dd2-cross-transfer__slot"></div>
    </div>
    <div class="nuda-dd2-cross-transfer__col">
      <span class="nuda-dd2-cross-transfer__colname">In Progress</span>
      <div class="nuda-dd2-cross-transfer__slot nuda-dd2-cross-transfer__slot--ghost" aria-hidden="true"></div>
    </div>
    <div class="nuda-dd2-cross-transfer__card" role="option" aria-selected="true" tabindex="0">Bug fix</div>
  </div>
</div>
CSS
.nuda-dd2-cross-transfer {
  width: 220px;
}

.nuda-dd2-cross-transfer__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.nuda-dd2-cross-transfer__board {
  position: relative;
  display: flex;
  gap: 8px;
}

.nuda-dd2-cross-transfer__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 9px;
  min-height: 70px;
}

.nuda-dd2-cross-transfer__colname {
  font: 700 9px ui-sans-serif,system-ui;
  color: #777;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.nuda-dd2-cross-transfer__slot {
  height: 30px;
  border-radius: 6px;
}

.nuda-dd2-cross-transfer__slot--ghost {
  border: 1.5px dashed rgba(228,255,84,.35);
  background: rgba(228,255,84,.05);
  animation: nuda-dd2-cross-transfer-ghost 3.2s ease-in-out infinite;
}

.nuda-dd2-cross-transfer__card {
  position: absolute;
  top: 26px;
  left: 8px;
  width: 88px;
  padding: 7px 10px;
  background: #161616;
  border: 1.5px solid #e4ff54;
  border-radius: 8px;
  font: 600 11px ui-sans-serif,system-ui;
  color: #fafafa;
  box-shadow: 0 10px 24px -8px rgba(228,255,84,.35);
  animation: nuda-dd2-cross-transfer-fly 3.2s cubic-bezier(.4,0,.2,1) infinite;
}

.nuda-dd2-cross-transfer__card:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

@keyframes nuda-dd2-cross-transfer-fly {
  0%,12%,100% {
    transform: translate(0,0) rotate(0deg);
  }
  50% {
    transform: translate(108px,-10px) rotate(-3deg);
  }
  80%,92% {
    transform: translate(108px,0) rotate(0deg);
  }
}

@keyframes nuda-dd2-cross-transfer-ghost {
  0%,45%,100% {
    opacity: .3;
  }
  70%,92% {
    opacity: .9;
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-dd2-cross-transfer__card,.nuda-dd2-cross-transfer__slot--ghost {
    animation: none;
  }
}

How to use Cross-Container Transfer

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 drag & drop components

← Browse all NudaUI components