add reduceMotion to ClientRouter props
#1248
DerTimonius
started this conversation in
Proposal
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Summary
Add a
reduceMotionprop toClientRouterto allow programmatic control of view transitions, enabling developers to build accessibility toolbars that let users disable animations on a per-site basis.Background & Motivation
Astro's
ClientRouterrespects the system-levelprefers-reduced-motionsetting, but some users may want granular control over animations on specific websites without changing system settings.Use case: Accessibility toolbars that offer per-site preferences like font size, dyslexia-friendly fonts, and motion reduction. Users can discover and toggle these preferences without knowing about system settings.
Goals
Example
Behavior
undefined(default): Respect systemprefers-reduced-motiontrue: Disable view transitions regardless of system settingfalse: Enable view transitions regardless of system settingAlternative approach
Expose a
setReducedMotionAPI from "astro:transitions" to achieve a similar outcomeBeta Was this translation helpful? Give feedback.
All reactions