All the Framer Motion properties, events, and utilities.
Here’s an overview of the Framer Motion API properties, user events, extra components, and utility functions,… with links to where they’re explained or used on this website. The Framer Motion 3D integration with React Three Fiber is not yet included.
For a demo of the visual and layout properties that you can actually animate, check Animatable Properties.
Animation properties
Every Motion element has this set of properties that make animations happen.
Transition options
Some transition
settings you can only use with tween curves, others only with a spring, but adding repetitions or a delay is possible with both.
Orchestration options
You can orchestrate child animations by adding these settings to their parent’s transition
. Important: they’ll only work with variants.
Tween | Spring | ||
---|---|---|---|
delayChildren
|
✅ | ✅ | Animation orchestration |
staggerChildren
|
✅ | ✅ | Animation orchestration |
staggerDirection
|
✅ | ✅ | Animation orchestration |
when
|
✅ | ✅ | Animation orchestration |
custom
|
✅ | ✅ | Variants > The custom property |
inherit
|
✅ | ✅ |
Drag properties
Change the behavior of a draggable element with these properties.
Drag transition options
Releasing a draggable element starts an inertia animation, which you can tweak with these dragTransition
options.
Events
An overview of the user events a motion element will react to. Plus also: the ‘while’ animation helpers.
You can also use common browser events. React will turn them into synthetic events (which still contain a reference to the original event).
Motion elements have a few more events that are triggered by animations:
onAnimationStart()
|
onUpdate()
|
onAnimationComplete()
|
onLayoutAnimationStart()
|
onLayoutAnimationComplete()
|
You can set configuration options for the whileInView
animation helper on the viewport
property.
viewport
|
↳
once
|
↳
root
|
↳
margin
|
↳
amount
|
Special components
Sometimes you need to wrap everything in a parent component that enables unmount animations: <AnimatePresence>
, or you might want to synchronise a set of layout animations in a <LayoutGroup>
.
Motion values
Hooks and other functions to create, transform, or animate Motion values.
There are special Motion values that you can use to change the path of an SVG motion.circle
, motion.ellipse
, motion.line
,motion.path
, motion.polygon
, motion.polyline
, or motion.rect
.
pathLength
|
Line Drawing |
pathSpacing
|
Line Drawing |
pathOffset
|
Line Drawing |
The Motion value API
Every Motion value has these methods. Use them to get its current value, change that value, or subscribe to value changes.
Utilities
These are the remaining Framer Motion utilities. The transform()
function is a version of the useTransform()
hook (see above) that works with common numeric values.
AnimationControls object
The useAnimationControls()
hook creates an AnimationControls object. These methods let you start and stop animations or instantly change the animated properties to a different value.
Note: The useAnimationControls()
hook is being phased out in favor of the recently added (Framer Motion 10.5) useAnimate()
hook.
start()
|
The useAnimationControls() Hook |
set()
|
|
stop()
|
The useAnimationControls() Hook |