Introduction

Installation

Learn how to install and configure Nuxt Color Mode
The current version of @nuxtjs/color-mode is compatible with Nuxt 3+. If you're looking for the previous version of this module, check out v2.color-mode.nuxtjs.org.

Setup

Add @nuxtjs/color-mode dependency to your project:

npx nuxt module add color-mode

Then, add @nuxtjs/color-mode to the modules section of your nuxt.config.ts:

nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    '@nuxtjs/color-mode'
  ]
})

You are ready to start using color mode in your app with .dark and .light classes ✨