loading code fetching the highlighted snippet
The card rests at an authored angle. Dragging translates it without flattening that angle — the drag translation is composed into the same transform as the authored rotate and skew, rather than replacing it.
rotate and skewX on style — not as a raw CSS transform string.whileDrag layers a second rotate on top for the duration of
the gesture, which takes over the channel while the pointer is down and hands it back
on release.A 3D variant: grabbing the card tilts it on both axes under a transformPerspective, and it keeps tilting while it tracks the pointer. The perspective and rotation survive every live drag frame.
transformPerspective is set on the card itself, so the tilt reads as
depth without needing a perspective wrapper around the stage.whileDrag applies rotateX and rotateY together.
Both 3D channels stay composed with the live translation for every frame of the drag.