Dark Mode

Adding dark mode support and theme toggling to Jolocky kinetic sections using next-themes and Tailwind CSS.

Award-winning web interfaces frequently feature dark aesthetics with high-contrast typography and subtle luminescent border highlights. Jolocky sections are dark-mode first by default.

Next.js Implementation Guide

Follow our comprehensive guide to set up next-themes and a theme toggle button in Next.js App Router:

How Dark Mode Works in Jolocky

Jolocky uses standard CSS custom properties defined in your global stylesheet.

  1. The root :root selector holds the light mode color values.
  2. The .dark selector overrides the variables with darker surface tones and higher contrast text.
  3. Tailwind CSS detects the .dark class using the custom variant selector:
app/globals.css
@custom-variant dark (&:is(.dark *));

All Jolocky sections automatically react to the theme change without requiring separate component variants or duplicate markup.