GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

09Drop placeholder — carrying the lifted row's height into a growing gap

Reading the dragged row's getBoundingClientRect height into a CSS variable and feeding it to the placeholder slot's --h makes height: var(--h) leave a gap of exactly the same size. Every time the placeholder moves to a new target position, a transition eases that height up or down, naturally showing how much the other rows shift.

Best forTo-do lists, file lists

transitionCSS custom propertiesgetBoundingClientRect
Drop placeholder — carrying the lifted row's height into a growing gap
Open in a new tab

09 Drop placeholder — carrying the lifted row's height into a growing gap — Measured area 25.853% · moving frames 13/23Original by GODRICH · SCSS and React ship in the zip · Drag to Reorder UI: 9 Lists, One Drop Index

The post this demo lives in

Drag to Reorder UI: 9 Lists, One Drop Index - preview of all 9 demosDrag to Reorder UI: 9 Lists, One Drop IndexDrag to reorder UI: Computing the drop index from pointer position reorders lists, kanban boards and grids -- with long- See all demos in this post

If you like this effect - similar demos