loading code fetching the highlighted snippet
Wrap m.* components in LazyMotion and pass a feature bundle. The element still animates on mount, while gesture support comes from the selected bundle.
LazyMotion provides the active feature bundle through context.
Descendant m.* elements read that context before attaching gesture, drag,
or layout behavior.domAnimation is the usual interactive bundle: mount/update animations plus
hover, tap, focus, pan, and in-view gestures.domMin keeps animation only, domAnimation enables gestures, and domMax adds drag/layout behavior for the subtree.
m.div receives different runtime capabilities depending on the
nearest LazyMotion provider.domMax.Import Reorder from @humanspeak/svelte-motion/m and it renders m components, so it takes drag and layout from <LazyMotion features={domMax} strict> without tripping strict mode.
Reorder renders motion components, which always
have every feature. Inside <LazyMotion strict> it warns once in development
and points here.m entry's Reorder the domMax bundle.An m with no LazyMotion features renders its initial and does nothing else, as in Motion. Give LazyMotion an async loader and its m components animate in from initial once the bundle arrives.
m.div has no LazyMotion above it, so it has no
animation runtime: it stays at its initial and ignores hover.initial while its loader is pending. Press "Load features"
and it animates in from there, then responds to hover.