Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript detect dark mode

const isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
Source by 1loc.dev #
 
PREVIOUS NEXT
Tagged: #javascript #detect #dark #mode
ADD COMMENT
Topic
Name
9+3 =