We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 687fa9a commit 85a71b3Copy full SHA for 85a71b3
src/__stories__/Skeleton.stories.tsx
@@ -394,3 +394,15 @@ export const RegressionTest133 = () => (
394
</div>
395
396
)
397
+
398
+export const PrefersReducedMotion = () => (
399
+ <div>
400
+ <p>With prefers-reduced-motion, this skeleton should not be animated.</p>
401
+ <Skeleton
402
+ circle
403
+ baseColor="lavender"
404
+ highlightColor="#E0B0FF"
405
+ style={{ display: 'block', width: 200, height: 200 }}
406
+ />
407
+ </div>
408
+)
src/skeleton.css
@@ -46,3 +46,9 @@
46
animation-timing-function: ease-in-out;
47
animation-iteration-count: infinite;
48
}
49
50
+@media (prefers-reduced-motion) {
51
+ .react-loading-skeleton {
52
+ --pseudo-element-display: none; /* Disable animation */
53
+ }
54
+}
0 commit comments