Dropdown Menu Control

Learn how to add and use Dropdown Menu Controls in After Effects to switch styles, trigger animations, and build flexible motion graphics templates.

Author:
Denis Stefanides
Category:
Expression Controls

What is a Dropdown Menu Control in After Effects?

A Dropdown Menu Control is an expression control effect in After Effects that lets you create a simple menu with selectable items. Think of it like a mini setting selector you can build right inside your comp.


How to Add a Dropdown Menu Control

Step 1: Apply the Control

  1. Select the layer where you want the control.

  2. Go to the top menu:
    Effect > Expression Controls > Dropdown Menu Control

You’ll see a new effect appear in the Effect Controls Panel called “Dropdown Menu Control” with no options yet.


How to Customize the Dropdown Menu

This part's easy to miss, but super important—you need to actually add items to the dropdown.

Step 2: Add Menu Items

  1. In the Effect Controls Panel, find Dropdown Menu Control

  2. Choose Edit.

  3. You’ll see a dialog that lets you name each item in the dropdown (just double click to rename). For example:

    • Style 1

    • Style 2

    • Style 3

  4. Hit OK.

Now your dropdown menu is ready to go.


How to Use Dropdown Menu in an Expression

The dropdown returns a number, not text.

  • The first item in the dropdown = 1

  • The second = 2

  • Third = 3, and so on

So if you have three items in the dropdown, and the user selects the second one, the value is 2.

Example: Control Position with Dropdown

Let’s say you want to move an object to different locations based on what’s selected in the menu.

Apply this expression to Position:

ctrl = effect("Dropdown Menu Control")("Menu").value;

if (ctrl == 1){
  [100, 100]
} else if (ctrl == 2){
  [500, 200]
} else {
  [300, 500]
}
javascript

What’s happening here?

  • ctrl grabs the selected index (like 1, 2, or 3)

  • Then we use an if-else chain to assign a different [x, y] position based on the selected item


Bonus: Create Shorter Code with switch

Instead of using a long if-else chain, you can make things neater with switch.

ctrl = effect("Dropdown Menu Control")("Menu").value;

switch (ctrl){
  case 1: 
    [100, 100]; 
    break;
  case 2: 
    [500, 200]; 
    break;
  case 3: 
    [300, 500]; 
    break;
}
javascript

It does the same thing, just in a cleaner format, especially when you’ve got more than 3 items.

Frequently asked questions

How do I use the expression on this page?

Just copy the full expression code from the top of this page. Then Alt-click (or Option-click on Mac) the stopwatch on the property you want to animate. Paste the code into the editor and that's it. If you’re not sure which property to use, check the "Where to Apply" section above.

The expression isn’t working. What should I check?

First, make sure your project is using the JavaScript engine (go to File > Project Settings > Expressions). Also double-check for missing characters, and see if the code requires parenting a layer. If so, there will be a comment in the code explaining what needs to be connected.

I’m not sure what the expression does. Where can I learn more?

Take a look at the "How It Works" section on this page. It explains each part of the expression in plain language so you can understand how everything works together.

Can I customize how the expression behaves?

Yes, absolutely. Most expressions include easy-to-edit variables near the top and comments that guide you on what to change. You can also link sliders or checkboxes using Expression Controls if you want more control in the timeline.

Can I apply this to other properties too?

Yes, you can use it on any property with a stopwatch. That includes Position, Scale, Opacity, and also effect settings like Blur or Tint.

Will it work in comps with different frame rates or sizes?

In most cases, yes. These expressions are designed to adapt to your comp’s resolution and frame rate. If anything specific needs adjusting, it’ll be noted in the code or in the "How It Works" section.