modern-monaco-svelte

Live theme switcher

modern-monaco's patched monaco.editor.setTheme() can only switch to a theme that was registered when the page's editor first initialized — so this page pre-registers a curated set of 12 themes from Shiki's theme gallery via the themes prop, and the picker below only offers those. Switching between them is instant because nothing needs to load. Because this editor is given an explicit theme, the app's light/dark toggle above doesn't affect it (only editors that omit theme follow dark/prefers-color-scheme).

Loading editor…