Installation
Included in the starter. Every new site has it in src/components/ui/theme-toggle/. Import it where you need it, or register it in src/components.ts to use it on every page. If your site predates it, install it:
npx @cloudflare/nimbus-docs add theme-toggleyarn nimbus-docs add theme-togglepnpm nimbus-docs add theme-togglebunx @cloudflare/nimbus-docs add theme-togglePreview
Click to flip between light and dark. Persists across navigation.
<ThemeToggle />