Origin-aware animation

Also called origin-aware popover

A popover, menu, or tooltip that grows out of the button that opened it, by setting its transform origin on the side facing the trigger.

What is Origin-aware animation?

When a dropdown scales in from its own center, it seems to appear out of thin air. Setting transform-origin to the corner or edge closest to the trigger makes it unfold out of the button instead, so the eye connects the click with the result. The same idea applies to tooltips growing from their arrow and context menus growing from the cursor.

The origin has to follow the real placement. Positioning libraries flip a menu above its button when there is no room below, and then it should grow from its bottom edge. Base UI sets a --transform-origin CSS variable and Radix sets one per component, such as --radix-popover-content-transform-origin, so you can use the computed value directly.

Keep the motion subtle: scale from 0.95 to 1 with a fade over 150 to 200ms. Modals are the usual exception, since they belong to the whole page and look right growing from the center.

Often confused with

Transform origin
Transform origin is the CSS property that sets the pivot point. Origin-aware animation is the design practice of pointing it at the trigger.
All terms

Transform origin

The point an element rotates and scales around. It defaults to the center, and moving it changes where a transform seems to start.

Popover

A small floating panel anchored to the button that opened it, often with an arrow, holding a few controls and closing when you click outside.

Dropdown menu

A list of actions that drops down from a button when you click it, then closes as soon as you pick one.

Spatial consistency

Moving elements in ways that match where things live in the interface, so people can tell where an item went and how to find it again.