Repository navigation
fix(registry): respect reduced motion in WordRotate, SpinningText and SparklesText - #1111
Open
yashjaiswal2818 wants to merge 1 commit into
Open
yashjaiswal2818 wants to merge 1 commit into
yashjaiswal2818 wants to merge 1 commit into
Conversation
|
@yashjaiswal2818 is attempting to deploy a commit to the product-studio Team on Vercel. A member of the Team first needs to authorize it. |
jinho-yeom
self-requested a review
November 29, 2026 12:14
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
WordRotate, SpinningText and SparklesText animate continuously and ignore
prefers-reduced-motion. This makes all three respect it. With reduced motion on, they still show their content, just without the movement. Without it, nothing changes.Changes
<MotionConfig reducedMotion="user">. With reduced motion, motion skips the slide and keeps the opacity fade, so words still change but don't move. This also covers custommotionProps.useReducedMotion(), transition becomes{ duration: 0 }).pnpm build:registryand committed the generated files.Motivation
These three loop forever and the OS setting can't stop them. Six components already respect reduced motion (DiaTextReveal, Dither, Floating3DParticles, IconCloud, RetroGrid, ScrollBasedVelocity), but these three didn't.
WordRotate uses
MotionConfiginstead ofuseReducedMotion()because the hook returnsnullon the server and the real value on the client. Changing WordRotate'sinitialfrom it caused a hydration mismatch, and the first word stayed stuck 50px up and out of view.MotionConfigapplies at animation time, so the server and client render the same markup. SpinningText and SparklesText only changetransitionand the sparkles created in the effect, so the hook is safe there.Breaking Changes
None for default setups. One edge case: if an app sets its own
<MotionConfig reducedMotion>, WordRotate's inner"user"takes precedence inside that component.Screenshots
This is a motion-only change, so I checked behavior instead of static screenshots. I loaded the three docs pages in Chrome with
prefers-reduced-motionemulated on and off, and sampled the animated elements over time:There were no hydration or console errors on any of the three pages in either mode.
Checklist
pnpm checkpasses locallypnpm buildpasses locallypnpm build:registrywas run and the generated files are committed