Back to Fluentui

CreateMotionComponentVariantDescription

packages/react-components/react-motion/stories/src/CreateMotionComponentVariant/CreateMotionComponentVariantDescription.md

4.40.2-hotfix2454 B
Original Source

createMotionComponentVariant() is a factory function that creates a new motion component based on an existing motion component, using the provided variant parameters as defaults.

This allows you to create specialized versions of motion components with different default behaviors, while still allowing runtime parameters to override the defaults when needed.

The variant parameters should match the type of the original component's motion parameters.