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

Default with Tag

Smaller text

Larger inherited line-height

Shorter labels

Change tag default

Custom colors

Every instance on the page stays in sync.

Internationalized

Events

Last theme-change event: none