Dark mode
Momo follows the system by default. Set data-momo-mode on <html> to choose.
<html data-momo-mode="dark"> <!-- always dark, gray lines -->
<html data-momo-mode="dark-black"> <!-- always dark, black lines -->
<html data-momo-mode="dark-split"> <!-- always dark, black cards, gray controls -->
<html data-momo-mode="light"> <!-- always light -->
<html> <!-- follow the system -->What changes
- Paper, surfaces and text flip to deep neutrals and warm off-white.
- Lines and shadows become a muted gray, so boxes keep their edge without glaring.
- Fills stay the same pop colors with ink text.
- Soft tints become dark tints, and
.text-<color>uses the fill.
Pick any of them from the sun / moon menu in the header: this page and every demo switch.
surface
bg-violet
bg-green-soft
text-red
<div class="box docs-tile">surface</div>
<div class="box docs-tile bg-violet">bg-violet</div>
<div class="box docs-tile bg-green-soft">bg-green-soft</div>
<div class="box docs-tile"><span class="text-red">text-red</span></div>Three darks
Pick how dark mode draws its lines:
dark: muted gray lines and shadows everywhere. The default when following the system.dark-black: black lines and shadows everywhere, badges, buttons and fields too. The moodiest.dark-split: black on cards, panels and dividers; badges, buttons, fields, checkboxes and other things you click or type into keep the gray edge, so they still stand out.
<html data-momo-mode="dark-split">
<!-- a theme toggle that switches to one of them -->
<button data-momo-theme-toggle data-momo-theme-dark="dark-black">…</button>
<!-- or a picker -->
<button data-momo-theme="dark-split">Dark, split</button>Card
Its edge and shadow follow the mode.
BadgeDone
<div class="card-grid">
<div class="card shadow"><div class="card-body stack gap-3"><h3 class="card-title">Card</h3><p class="card-text">Its edge and shadow follow the mode.</p><div class="cluster"><span class="badge">Badge</span><span class="badge badge-green">Done</span></div></div></div>
<div class="card"><div class="card-body stack gap-3"><input class="form-control" placeholder="A field" aria-label="Sample field"><label class="check"><input type="checkbox" checked> A checkbox</label><button class="btn btn-sm" type="button">A button</button></div></div>
</div>