Published
Edited
Mar 4, 2022
3 stars
Insert cell
Insert cell
isDarkMode = () =>
window.matchMedia &&
window.matchMedia("(prefers-color-scheme: dark)").matches;

Insert cell
isDarkMode()
Insert cell
html`<div> Dark mode is ${isDarkMode()? "enabled": "not enabled"}</div>`
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more