← ClaudeAtlas

frontend-dark-modelisted

Use when adding a light/dark theme toggle: add a persisted light and dark theme toggle driven by a CSS class on the root element.
sarmakska/slipstream · ★ 1 · Web & Frontend · score 73
Install: claude install-skill sarmakska/slipstream
## Overview Add a persisted light and dark theme toggle driven by a CSS class on the root element. ## Steps 1. Enable Tailwind `darkMode: 'class'` and toggle a `dark` class on `document.documentElement`. 2. Persist the choice in `localStorage` and respect `prefers-color-scheme` on first load. 3. Expose a single accessible toggle button in the header. ## Verify Typecheck, toggle the theme, reload the page, and confirm the chosen theme survives the reload.