Reduced Motion Provider
Force-disable animations for any subtree.
ReducedMotionProvider opts a subtree out of animation. Components already honor
the OS prefers-reduced-motion setting on their own — this provider is the
explicit, global override (for a user preference toggle, demos, or tests).
Usage
When disableAnimations is set, the provider writes a data-disable-animations
attribute to <html>. That's deliberate: it has to reach Base UI's portaled
popups, which render under document.body and so escape the React subtree.
Two channels
The provider drives motion through two coordinated channels:
- CSS — the
data-disable-animationsattribute on<html>triggers themotion-reducevariant page-wide (popups included). This is what stops component transitions. See Animation. - JavaScript —
useReducedMotion, scoped to this provider's React subtree, returnstrueso your own animation code can branch.
Props
Leaving disableAnimations off doesn't re-enable motion for users who request reduced motion at the OS level — that
preference is always respected. The provider can only make things more still, never less.