Motion Library ‹ Free tools

All / Exit

Swipe away

Drag a card sideways. Past a threshold it flies off screen; otherwise it springs back.

CSSJavaScriptIntermediate
Live demo Open full screen

Good for

Mobile notifications, inbox rows, tinder-style cards and bottom sheets.

Watch out for

Use pointer events plus touch-action pan-y so vertical page scrolling still works.

Accessibility

Wrap motion in @media (prefers-reduced-motion: reduce) and switch it off or shorten it for people who ask for less movement.