Dropdown Variants
A Dropdown Menu Control switches any property between named preset values — the backbone of template variants.
Expression Code
// Dropdown Variants// Apply to Position (works on any property — match the array to it)// Add a Dropdown Menu Control named "Variant"variants = [[960, 980], // Item 1 — Bottom[960, 540], // Item 2 — Centre[960, 120] // Item 3 — Top];choice = effect("Variant")("Menu").value;idx = Math.round(choice) - 1;if (idx < 0) idx = 0;if (idx > variants.length - 1) idx = variants.length - 1;variants[idx];
Add Effect > Expression Controls > Dropdown Menu Control, rename the effect to "Variant", and click Edit… beside the Menu property to name your options. Apply the expression to the property you want to switch and fill the variants array — [x, y] pairs for Position, single numbers for Opacity or Rotation, [r, g, b, a] arrays (0–1) for colours. Item 1 in the menu always picks the first array entry.