Discover best's
After Effects expressions

Your daily dose of expressions.
What are expressions ?
Expressions in After Effects are lines of code that allow you to create links between different layer properties and control them in a more precise and flexible way. They enable you to create more complex animations and synchronize them with other elements in the composition more efficiently.

For example, you can use an expression to make one layer's position follow another layer's, or to ensure that the value of a property, such as a layer's opacity, varies based on the audio frequency of an audio track.
Resources for learning expressions
Expressions Cheat Sheet
Expressions docs
Motion script
More resources to come...
May 22, 2023
Copy code Icon
Fade a layer according to distance from the camera
Simply apply this script to the opacity of your layer, and the layer will fade as it approaches the camera. This code is useful when you want to simulate depth of field and control when your layers should fade.
Code is not available on mobile.
May 22, 2023
Copy code Icon
"Bounding box" for a text
Here's the expression to automatically resize a text box in After Effects, which should save you a lot of time. The first expression must be applied to the size of your rectangle shape, while the second must be added to the anchor point of your rectangle shape.
Code is not available on mobile.
May 22, 2023
Copy code Icon
Bounce on rotation
Create two key points and use this rotational bounce expression. I'd like to thank School of Motion for this script. For more details on this specific bounce expression, please visit their website.
Code is not available on mobile.
May 22, 2023
Copy code Icon
Bounce on scale
Here's a cool way to give your layer the bouncy effect of jelly or gelatin.
Code is not available on mobile.
May 22, 2023
Copy code Icon
Trigger expression on marker
Automate actions based on the position of markers in the composition.
Code is not available on mobile.
May 22, 2023
Copy code Icon
Show/Hide layer with drop-down list
Apply to a layer's opacity property. Change the layer name to begin with [1,2,3] to match the drop-down parameter.
Code is not available on mobile.
May 22, 2023
Copy code Icon
Get the date
The expression for the current date gives you immediate access to today's value.
Code is not available on mobile.
May 22, 2023
Copy code Icon
Obtain the composition's center and scale
Use the "Composition width and height" expression to center and scale a layer.
Code is not available on mobile.
May 22, 2023
Copy code Icon
Create a delay
The "Delay" function can be used to create a delay of a certain number of frames.
Code is not available on mobile.
May 22, 2023
Copy code Icon
Center anchor point vertically on text
Ensure that the anchor point is always vertically centered on a text layer.
Code is not available on mobile.
May 22, 2023
Copy code Icon
Attach a 2D position to a 3D Null
A small, powerful and versatile expression for wide-ranging possibilities.
Code is not available on mobile.
May 22, 2023
Copy code Icon
Keep the same stroke width
Expression to maintain the contour width of a shape when resizing it.
Code is not available on mobile.
February 14, 2023
Copy code Icon
Timer / animated timecode
Expression to copy into your text source.
Code is not available on mobile.
February 14, 2023
Copy code Icon
Auto Fade In & Out
Make a layer appear and disappear by using an expression to define the duration.
Code is not available on mobile.
February 14, 2023
Copy code Icon
Ignore "parent" layer rotation
A small expression to add to the rotation of the "child" layer to ignore the rotation of the "parent".
Code is not available on mobile.
February 14, 2023
Copy code Icon
Reduce the number of images
Expression that uses the "temporal posterization" effect, to be copied above the expression you wish to affect.
Code is not available on mobile.
February 14, 2023
Copy code Icon
Block a random number
Use this expression in your text source, to generate a fixed and random number.
Code is not available on mobile.
February 14, 2023
Copy code Icon
Wiggle between two values
Expression that works on number value properties.
Code is not available on mobile.
February 14, 2023
Copy code Icon
Typewriter effect
Expression to paste into your text source.
Code is not available on mobile.
February 14, 2023
Copy code Icon
Wiggle on X or Y
Limits the wiggle to a single dimension. This expression concerns only X to affect Y change the last line to [ value[ 0 ],w[ 1 ] ].
Code is not available on mobile.
February 14, 2023
Copy code Icon
Checking a property with a checkbox
Use this expression for a property you want to be able to "check".
Code is not available on mobile.
February 14, 2023
Copy code Icon
Bounce
Use this expression to create a bounce effect.
Code is not available on mobile.
February 14, 2023
Copy code Icon
Create a loop
This expression is the best way to loop an animation, as it loops both the animation input and the output.
Code is not available on mobile.
February 14, 2023
Copy code Icon
Sin Curve
Expression to be copied into the property to which you wish to apply a deformation with a sine curve.
Code is not available on mobile.
February 14, 2023
Copy code Icon
Control the number of repetitions of your loop
Very useful when you have an end to your "loopOut".
Code is not available on mobile.
February 5, 2023
Copy code Icon
Blink Effect
One of several solutions for creating a "blinking" effect. Paste this expression into your opacity property.
Code is not available on mobile.
February 5, 2023
Copy code Icon
Random blinking
Very useful and quick to create a "neon" effect. An expression to copy into your opacity property. Simply set the opacity of the affected layer to 50% and paste the following expression:
Code is not available on mobile.
February 5, 2023
Copy code Icon
Center your form repeat
Copy this expression into the offset attribute of your repeat on your shape layer. It automatically centers the repeat on the middle shape. Bonus: duplicate your repeat and reverse the axis to create a grid.
Code is not available on mobile.
February 5, 2023
Copy code Icon
Loop a Wiggle
Expression to be copied into the property you wish to "wiggle".
Code is not available on mobile.
No results.
Sorry, no matches for your search. Please try again.
Copy code Icon Black
Expression copied to clipboard