I’ve built a fully themeable and accessible dark mode toggle component for React. [Details in the comments]

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

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
  • dark-mode-toggle

    🌓 A dark mode toggle component for React. (by anatoliygatt)

  • 🗄 Repository: GitHub 💻 Live Demo: CodeSandbox 🖼 Storybook: Netlify

  • use-prefers-color-scheme

    🪝 React hook for subscribing to user's color scheme preference.

  • Thank you! I'm not linking to any articles here. dark-mode-toggle is a controlled React component, so you can query the preferred color scheme with a hook like https://github.com/anatoliygatt/use-prefers-color-scheme and set the mode prop to whatever value you like, as long as it is either dark or light 😉.

  • 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