use-prefers-color-scheme
πͺ React hook for subscribing to user's color scheme preference. (by anatoliygatt)
use-prefers-reduced-motion
πͺ React hook for subscribing to user's motion preference. (by anatoliygatt)
Our great sponsors
use-prefers-color-scheme | use-prefers-reduced-motion | |
---|---|---|
2 | 3 | |
31 | 20 | |
- | - | |
3.9 | 3.9 | |
9 months ago | 9 months ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
use-prefers-color-scheme
Posts with mentions or reviews of use-prefers-color-scheme.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-07-20.
-
Iβve built a fully themeable and accessible dark mode toggle component for React. [Details in the comments]
Thank you! I'm not linking to any articles here. dark-mode-toggle is a controlled React component, so you can query the preferred color scheme with a hook like https://github.com/anatoliygatt/use-prefers-color-scheme and set the mode prop to whatever value you like, as long as it is either dark or light π.
-
Iβve built two React hooks that will help you in making your apps more accessible
π Repository: GitHub π» Live Demo: CodeSandbox
use-prefers-reduced-motion
Posts with mentions or reviews of use-prefers-reduced-motion.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-01-20.
-
Iβve built a fully themeable and accessible numeric stepper component for React. [Details in the comments]
The user who experiences issues caused by motion can use the component by clicking on the increment/decrement buttons or the thumb. In this way, there is no excessive motion, though I believe the physics-based animation as a response to drag is not excessive at all. I was deep-diving into the motion-related accessibility issues when building https://github.com/anatoliygatt/use-prefers-reduced-motion.
-
Iβve built two React hooks that will help you in making your apps more accessible
A couple of notes for the usePrefersReducedMotion hook.
π Repository: GitHub π» Live Demo: CodeSandbox
What are some alternatives?
When comparing use-prefers-color-scheme and use-prefers-reduced-motion you can also consider the following projects:
use-color - πΌπΌπΌ The powerful color hook that all designers deserve. β¨ Parse and stringify that just works & π¦Ύ Strict type checking at compile time
react-hook - β© Strongly typed, concurrent mode-safe React hooks
react-as-prop - Type-safe `as` prop utility for flexible and semantic UI components of React
tab-a11y