dec 27, 2025
a sequential multi-step form with a smooth height transition between steps (no layout jump).
key insight: observe the active step content with ResizeObserver, store its offsetHeight, and animate a wrapper motion.div height with a spring. AnimatePresence (mode="wait") keeps enter/exit clean while the height animates to the next step.