Installnpx shadcn@latest add https://motion-lexicon.pages.dev/r/primitive-crossfade.json
- Purpose
- Switch similarly sized states in the same location while reducing abrupt replacement.
- Trigger
- Trigger from selection, content version, or media-state changes, with both states sharing one layout slot.
- Interruptibility
- On rapid changes, continue from the current blend ratio and retain only the latest target.
- Reduced motion
- Shorten to 80–120ms or switch immediately while preserving stable dimensions.
crossfadeCrossfadeTwo overlapping states exchange opacity over the same interval, handing visual focus from one to the other.