design-infraGitHub
Report a problem or share feedback← Catalog

usePresenceData

free

motion/use-presence-data

An example of using usePresenceData to pass custom data through AnimatePresence to exiting elements.

enter — mediumrecipeRefinedPlayful
$pnpm add motion # then adapt the free source from https://motion.dev/examples/react-use-presence-data

npm deps: motion

usePresenceData preview
Source
Motion (motion.dev)
Kind
transition
Categories
transition
Use as
recipe — technique you apply to your own markup
Motion
on enter · medium · motion · medium cost
Tags
motion, AnimatePresence, animate, whileTap, whileFocus
Licence
motion / motion/react / motion-v are MIT. Motion+ (premium components, example source, AI Kit pro tools) is paid — one-time Personal licence or per-seat Business.
Live demo
motion.dev
Docs
motion.dev