Animation guardrails
Compositor-friendly motion, reduced-motion, theme animation tokens. Detail in DESIGN.md.
Animation guardrails
Installation
pnpm dlx shadcn@latest add @aura/rule-fundation-animations- MUST: Honor
prefers-reduced-motionwith a reduced variant. - MUST: Prefer CSS (
@themeanimation tokens +@keyframesin@layer components) over Web Animations API or JS libraries. - MUST: Animate
transformandopacityonly. Avoid layout props (top/left/width/height) except accordion/collapsible height tovar(--radix-*-content-height). - MUST: Set
transform-originso motion starts where it physically should. - MUST: Enter/exit content with
opacity+transform: scale(). Overlays SHOULD use opacity only. - MUST: Keep motion interruptible and input-driven (no decorative autoplay).
- SHOULD: Interactive hover/active use
scale(1.03)/scale(0.97)withtransition: transform …. - SHOULD: Use ~250ms steps; match easing to the change (tooltips
ease-in-out, dialogscubic-bezier(0.16, 1, 0.3, 1), accordionease, buttonscubic-bezier(0.4, 0, 0.6, 1)). - SHOULD: Animate only to clarify cause/effect or add deliberate delight.