Motion primitive

A motion primitive for animating the entry and exit of components.

Early Access

The new Motion primitive and tokens are currently in early access. We may make frequent breaking changes with limited notice. We don't recommend using this without support from our team.

Props

children

Required
Description

Children to be animated.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

enteringAnimation

Description

Motion token for the entering animation.

Type"var(--ds-avatar-enter)" | "var(--ds-avatar-exit)" | "var(--ds-avatar-hovered)" | "var(--ds-blanket-enter)" | "var(--ds-blanket-exit)" | "var(--ds-button-hovered)" | "var(--ds-button-pressed)" | ... 33 more ... | "var(--ds-spotlight-exit)"

enteringAnimationXcss

Description

CSS properties to apply to the entering animation.

Typefalse | (XCSSValue<"animationDelay" | "animationDuration" | "animationName" | "animationTimingFunction", DesignTokenStyles, ""> & {} & XCSSPseudo<...> & XCSSMediaQuery<...> & { ...; } & { ...; })

exitingAnimation

Description

Motion token for the exiting animation.

Type"var(--ds-avatar-enter)" | "var(--ds-avatar-exit)" | "var(--ds-avatar-hovered)" | "var(--ds-blanket-enter)" | "var(--ds-blanket-exit)" | "var(--ds-button-hovered)" | "var(--ds-button-pressed)" | ... 33 more ... | "var(--ds-spotlight-exit)"

exitingAnimationXcss

Description

CSS properties to apply to the exiting animation.

Typefalse | (XCSSValue<"animationDelay" | "animationDuration" | "animationName" | "animationTimingFunction", DesignTokenStyles, ""> & {} & XCSSPseudo<...> & XCSSMediaQuery<...> & { ...; } & { ...; })

onFinish

Description

Will callback when the motion has finished in the particular direction. If it finished entering direction will be entering. And vice versa for exiting.

Type(state: Transition) => void

ref

Description

Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).

@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}

Typestring | Ref<any>

style

Description

Inline styles to apply to the motion container div. These are merged with any animation styles managed internally.

TypeCSSProperties

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring

xcss

Description

CSS properties to apply to the motion container.

Typefalse | (XCSSValue<"width" | "height" | "flex" | "grid" | "fill" | "stroke" | "all" | "bottom" | "left" | "right" | "top" | "clip" | "overlay" | "accentColor" | "alignContent" | "alignItems" | ... 485 more ... | "glyphOrientationVertical", object, ""> & ... 4 more ... & { ...; })
Was this page helpful?
We use this feedback to improve our documentation.
  • Design system
    • Get started
    • Foundations
    • Components
    • Rovo UI
    • Tools
    • Release phases
    • Contact us
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License