LayoutGroup
LayoutGroup scopes components that share layoutId values so they can animate together even when
they live in different branches of the tree. Use it for shared underlines, sliding pills, and hero
transitions.
import { LayoutGroup, motion } from 'motion-solidjs'
function Tabs() {
return (
<LayoutGroup id="tabs">
<motion.span layoutId="active" />
</LayoutGroup>
)
}
π
Props
id- optional namespace; if omitted a stable one is generatedinherit-boolean(defaulttrue),'id', or'group'.trueinherits both id and group from the surroundingLayoutGroup;'id'and'group'inherit only that half.
See also
createLayoutGroup- the primitivemotionlayout/layoutId