Motion
Motion tokens scale with --pm-motion-scale (set by data-motion or the OS reduced-motion preference). Spatial movement only plays for users who have not asked for reduced motion, and the final state is always kept.
Presets
Add data-animate to any element. Entry plays on insertion via @starting-style, with no JavaScript.
fadescalepopslide-upslide-downblurTokens
| Duration | ms |
|---|---|
--pm-duration-instant | 50 |
--pm-duration-fast | 120 |
--pm-duration-normal | 200 |
--pm-duration-moderate | 280 |
--pm-duration-slow | 400 |
--pm-duration-slower | 600 |
| Easing | Value |
|---|---|
--pm-ease-standard | cubic-bezier(0.2, 0, 0, 1) |
--pm-ease-decelerate | cubic-bezier(0, 0, 0, 1) |
--pm-ease-accelerate | cubic-bezier(0.3, 0, 1, 1) |
--pm-ease-emphasized | cubic-bezier(0.3, 0, 0, 1.0) |
--pm-ease-spring | linear(0, 0.049, 0.161, 0.291, 0.428, 0.573, 0.691, 0.792, 0…) |
--pm-ease-bounce | linear(0, 0.137, 0.425, 0.753, 1.037, 1.226, 1.307, 1.294, 1…) |
--pm-ease-gentle | linear(0, 0.031, 0.103, 0.191, 0.296, 0.394, 0.489, 0.584, 0…) |
Springs
Scroll-driven and view transitions
animate() plays every preset above and, from script only, slide-start and slide-end.