Moey Icons
No results. Try “dialog”, “dark” or “grid”.
Customize

Color modes

Light and dark mode are built in. Every color uses light-dark(), so there's no second stylesheet.

By default Moey follows the operating system. Force a mode with data-mo-theme on <html> — or on any element to give just that section its own mode.

data-mo-theme="light"

Always light, whatever the page mode is. A link.

data-mo-theme="dark"

Always dark, whatever the page mode is. A link.

<html data-mo-theme="dark">           <!-- whole page -->
<div data-mo-theme="light">…</div>    <!-- one section -->

Surface & text tokens

Build your own UI with these and it adapts to both modes automatically.

A switch from code

Store the choice and set it before the page paints, so there’s no flash.

<script>
  // in <head>, before the stylesheet
  const mode = localStorage.getItem('mode');            // 'light' | 'dark' | null
  if (mode) document.documentElement.dataset.moTheme = mode;
</script>

// later, from a button
document.documentElement.dataset.moTheme = 'dark';
localStorage.setItem('mode', 'dark');

A dark panel on a light page

Mode works on any element — a dark card in a light dashboard keeps every component correct.

Revenue (dark)
$48,210
12.4%
Orders (light)
1,284
8.1%
<div class="card" data-mo-theme="dark">…</div>

Your own colors in both modes

Use light-dark() — first value for light, second for dark.

.highlight {
  background: light-dark(var(--mo-amber-100), var(--mo-amber-900));
  color:      light-dark(var(--mo-amber-900), var(--mo-amber-100));
}