Skip to content

Color Scheme

Set preferred color scheme

Syntax

visual="color-scheme:[value]"

Values

ValueCSS OutputDescription
lightcolor-scheme: lightLight mode
darkcolor-scheme: darkDark mode
normalcolor-scheme: normalSystem default

Examples

html
<html visual="color-scheme:dark">Dark mode</html>

Preview

Color Scheme

visual="color-scheme:dark" - Set preferred color mode

light
dark
View Code
html
<div layout="flex" space="g:medium p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
  <div space="p:small" visual="bg:primary text:white rounded:small">light</div>
  <div space="p:small" visual="bg:primary text:white rounded:small">dark</div>
</div>