Skip to the demo zachleat Demo

<solar-eclipse-toggle> Web Component

An accessible light/dark theme toggle button that follows your system preference by default.

This page is dark by default, ignoring your system preference, using <html data-theme-default="dark">. Return to the main demo.

Default

Custom colors

Every instance on the page stays in sync.

Events

Last theme-change event: none