How to get a flickerless persistent dark mode in your Next.js app

This page summarizes the projects mentioned and recommended in the original post on /r/nextjs

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • buzzrank-tutorial

    Follow me on https://www.youtube.com/channel/UCAMZOwzs2PTGiYKyD4VF4Hw

  • Demo of how it works Repo of the project Link to the original article Video to follow along

  • chakra-ui

    ⚡️ Simple, Modular & Accessible UI Components for your React Applications

  • Because Next.js renders React pages on the server, the standard “store the theme value in your clients local storage” approach doesn’t work properly. And if you still do that, then you will end up facing the dreaded Dark Mode Flicker. Meaning your page will always flicker from white to dark on page load. MUI or Chakra UI suffer form this (to test it, just switch to dark mode, and hard refresh the page, or close the page and reopen it).

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts