Skip to content
Styling & UI · Lesson 02 of 05 · Builds on CSS in single-file components

Dark mode and theming

Name colours by role as CSS custom properties, offer light, dark and system with useColorMode(), and set the theme before the first paint so the page never flashes.