Skip to content

usePreferredDark ​

Hook that returns if the user prefers dark mode

browser
test coverage
Last changed: last month

Installation ​

Library
CLI
Manual
typescript
import { usePreferredDark } from '@siberiacancode/reactuse';

Usage ​

typescript
const isDark = usePreferredDark();

Demo ​

Source ​

Source • Demo

Contributors ​

D
debabin
debabin

Released under the MIT License.