Grip Handle Lift
A copy-paste drag & drop component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Drag & DropHTMLCSSany framework
Grab the handle and press Alt plus Arrow Up or Arrow Down to reorder.
Write brief
Review deck
Ship release
Copy into your project
HTML
<!-- Grip Handle Lift — set .nuda-dd2-grip-handle__row--drag on the row
being dragged, .nuda-dd2-grip-handle__row--gap on the row that yields
space. Keyboard: focus a row, Alt+ArrowUp/ArrowDown reorders. -->
<div class="nuda-dd2-grip-handle" role="listbox" aria-label="Task list" aria-describedby="dd2-grip-handle-desc">
<p id="dd2-grip-handle-desc" class="nuda-dd2-grip-handle__sr">Grab the handle and press Alt plus Arrow Up or Arrow Down to reorder.</p>
<div class="nuda-dd2-grip-handle__row" role="option" aria-selected="false">
<span class="nuda-dd2-grip-handle__grip" aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i></span>
<span class="nuda-dd2-grip-handle__label">Write brief</span>
</div>
<div class="nuda-dd2-grip-handle__row nuda-dd2-grip-handle__row--gap" role="option" aria-selected="false">
<span class="nuda-dd2-grip-handle__grip" aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i></span>
<span class="nuda-dd2-grip-handle__label">Review deck</span>
</div>
<div class="nuda-dd2-grip-handle__row nuda-dd2-grip-handle__row--drag" role="option" aria-selected="true" tabindex="0">
<span class="nuda-dd2-grip-handle__grip" aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i></span>
<span class="nuda-dd2-grip-handle__label">Ship release</span>
</div>
</div>CSS
.nuda-dd2-grip-handle {
width: 170px;
display: flex;
flex-direction: column;
gap: 6px;
}
.nuda-dd2-grip-handle__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-grip-handle__row {
display: flex;
align-items: center;
gap: 8px;
padding: 7px 10px;
background: #161616;
border: 1px solid rgba(255,255,255,.08);
border-radius: 8px;
}
.nuda-dd2-grip-handle__row:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
.nuda-dd2-grip-handle__grip {
display: grid;
grid-template-columns: repeat(2,3px);
grid-auto-rows: 3px;
gap: 2px;
}
.nuda-dd2-grip-handle__grip i {
width: 3px;
height: 3px;
border-radius: 50%;
background: #63636e;
display: block;
}
.nuda-dd2-grip-handle__label {
font: 500 11px ui-sans-serif,system-ui;
color: #cfcfcf;
}
.nuda-dd2-grip-handle__row--gap {
animation: nuda-dd2-grip-handle-gap 2.6s ease-in-out infinite;
}
.nuda-dd2-grip-handle__row--drag {
position: relative;
z-index: 2;
border-color: #e4ff54;
animation: nuda-dd2-grip-handle-drag 2.6s ease-in-out infinite;
}
.nuda-dd2-grip-handle__row--drag .nuda-dd2-grip-handle__grip i {
background: #e4ff54;
animation: nuda-dd2-grip-handle-dot 2.6s ease-in-out infinite;
}
.nuda-dd2-grip-handle__row--drag .nuda-dd2-grip-handle__label {
color: #fafafa;
}
@keyframes nuda-dd2-grip-handle-drag {
0%,14%,100% {
transform: translateY(0);
box-shadow: none;
}
40%,74% {
transform: translateY(-10px);
box-shadow: 0 10px 22px -8px rgba(0,0,0,.5),0 0 0 1.5px rgba(228,255,84,.5);
}
}
@keyframes nuda-dd2-grip-handle-gap {
0%,14%,100% {
transform: translateY(0);
}
40%,74% {
transform: translateY(10px);
}
}
@keyframes nuda-dd2-grip-handle-dot {
0%,14%,100% {
opacity: 1;
}
40%,74% {
opacity: .6;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-dd2-grip-handle__row--gap,.nuda-dd2-grip-handle__row--drag,.nuda-dd2-grip-handle__row--drag .nuda-dd2-grip-handle__grip i {
animation: none;
}
}
How to use Grip Handle Lift
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.