Theme toggle
Icon button that cycles the document theme: system, light, dark.
API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-theme-toggle> · RayThemeToggle
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
size | size reflects | xs | sm | md | lg | xl | sm | Control height. |
| Event | Description |
|---|---|
ray-theme-change | Fired on the document root by setTheme(); detail: { theme, resolved, primary }. |
| Part | Description |
|---|---|
button | The inner button. |
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
| Key | English |
|---|---|
theme-toggle.system | System theme |
theme-toggle.light | Light theme |
theme-toggle.dark | Dark theme |
theme-toggle.switch | {theme} (switch to {next}) |
theme-toggle.to-system | system |
theme-toggle.to-light | light |
theme-toggle.to-dark | dark |