This is a minimalist Vue.js plugin for achieving dark mode on a web app. See usage instructions below ⬇️
Install package
npm install @fredrick.mgbeoma/simple-dark-mode
In your project entry point, e.g src/main.ts
import { createApp } from "vue";
import SimpleDarkMode from "@fredrick.mgbeoma/simple-dark-mode";
import App from "./App.vue";
import "./assets/main.css";
import "@fredrick.mgbeoma/simple-dark-mode/dist/style.css";
const app = createApp(App);
app.use(SimpleDarkMode);
app.mount("#app");
// e.g HeaderComponent.vue
<template>
// ...
<SimpleDarkMode />
// ...
</template>
npm run dev
npm run build
Lint with ESLint
npm run lint