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.

Return to the GitHub Repository.

See also a page that is dark by default.

Default

Smaller text

Shorter labels

Auto instead of System

Custom colors

Every instance on the page stays in sync.

Internationalized

Events

Last theme-change event: none