Skip to content

feat(theme): add motion tokens and popup-scale animation#567

Open
isaquebock wants to merge 2 commits into
mainfrom
feat/motion-tokens-popup-scale
Open

feat(theme): add motion tokens and popup-scale animation#567
isaquebock wants to merge 2 commits into
mainfrom
feat/motion-tokens-popup-scale

Conversation

@isaquebock
Copy link
Copy Markdown
Collaborator

Summary

  • Introduce primitive motion tokens (curve and duration) in packages/theme/src/tokens/primitives/animations/animate.js, matching the Motion design tokens (productive/expressive entrance & exit curves; fast/moderate/slow durations).
  • Compose new popup-scale-in / popup-scale-out animations from those tokens.
  • Expose .animate-popup-scale-in and .animate-popup-scale-out semantic utilities with popupScaleIn / popupScaleOut keyframes (opacity + scale 0.95 → 1), with a configurable --popup-origin transform origin.

Tokens

Curves

Token Value
curve-productive-entrance cubic-bezier(0.39, 0.57, 0.56, 1)
curve-productive-exit cubic-bezier(0.55, 0.09, 0.68, 0.53)
curve-expressive-entrance cubic-bezier(0.17, 0.84, 0.44, 1)
curve-expressive-exit cubic-bezier(0.95, 0.05, 0.8, 0.04)

Durations

Token Value
duration-fast-01 70ms
duration-fast-02 110ms
duration-moderate-01 150ms
duration-moderate-02 240ms
duration-slow-01 400ms
duration-slow-02 700ms

Test plan

  • Theme builds without errors (pnpm --filter @azion/theme build)
  • .animate-popup-scale-in / .animate-popup-scale-out are emitted in the generated CSS
  • Popup/menu components animate using the new utility without regressions
  • --popup-origin overrides the transform origin as expected

Add curve and duration tokens to primitives/animations/animate.js based on
the Motion design tokens (productive/expressive entrance/exit curves and
fast/moderate/slow durations). Compose popup-scale-in/out animations from
these tokens.
Expose .animate-popup-scale-in and .animate-popup-scale-out utilities with
matching popupScaleIn/popupScaleOut keyframes (opacity + scale 0.95 → 1).
Support a configurable transform-origin via the --popup-origin CSS variable.
@isaquebock isaquebock requested a review from a team as a code owner May 21, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants