Skip to content

usePreferredDark ​

Category
Browser

Hook that returns if the user prefers dark mode

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

Usage ​

typescript
const isDark = usePreferredDark();

Demo ​

Api ​

Contributors ​

Source • Demo