Dark Mode
Turn on dark mode with a single class. Apply it to the whole document or just one region — surfaces, text, and borders flip; the brand colours stay exactly where they are.
Enabling dark mode
Add class="dark" (or the attribute data-bima-theme="dark") to any element. The dark tokens are declared on that selector, so every BIMA component inside it switches to its dark surface, text, and border values. Put it on <html> or <body> for the whole page, or on a single container to darken just that subtree.
<!-- Whole document --> <html class="dark"> … </html> <!-- or via the data attribute --> <body data-bima-theme="dark"> … </body> <!-- or just one region of an otherwise-light page --> <section class="dark"> … </section>
Both hooks behave identically — the stylesheet targets .dark, [data-bima-theme="dark"]. Use the class for simplicity, or the data attribute if you prefer to keep theme state out of your class list.
See it flip
The card below is wrapped in a .dark container. The same bima-* components you use everywhere else simply read the dark token values inside it — no special dark variants of the classes are needed.
Monthly summary
April 2026
Surfaces, text, and borders all switch to their dark values inside the wrapper.
<div class="dark" style="background:#0E1422;padding:1.5rem;border-radius:.75rem">
<div class="bima-card bima-card--soft">
<div class="bima-card__header">
<h3 class="bima-card__title">Monthly summary</h3>
<p class="bima-card__subtitle">April 2026</p>
</div>
<div class="bima-card__body">
<p>Surfaces, text, and borders all switch to their dark values.</p>
<button class="bima-btn bima-btn--primary">View report</button>
<span class="bima-badge bima-badge--success">Active</span>
</div>
</div>
</div>Because .dark works on any element, you can preview a dark component on a light docs page (as above) or build a half-dark layout — for example a dark sidebar alongside a light main area.
Brand colours stay constant
Dark mode re-declares only the neutral tokens — surfaces, text, borders, interaction states, and the status -bg tints. The brand colours stay constant: navy, blue, and sky keep their values so the primary button, accents, and brand voice look the same in either theme.
This is deliberate — a recognisable brand reads identically in light and dark. If you want to tune which tokens change (or build a custom dark palette), see the deep dive on the Customize → Dark Mode page.