loading code fetching the highlighted snippet
A constrained drag pattern for product UIs: the tile can be pulled against the bounds with a little elastic give, then springs back inside the measured ref on release.
dragElastic value allows a small overpull
while the pointer is down, so the bounds feel physical instead of mechanically clipped.dragConstraints. Svelte
Motion measures that ref and keeps the final resting position inside it.