@crtxio/darkmode
v0.0.3
Published
@crtxio/darkmode is a Nuxt3 layer which provides a Nuxt 3 component to toggle between dark and light mode.
Downloads
9
Readme
@crtxio/darkmode
@crtxio/darkmode is a Nuxt3 layer which provides a Nuxt 3 component to toggle between dark and light mode.
Setup
Make sure to install the dependencies:
npm install --save @crtxio/darkmode
or
yarn add @crtxio/darkmode
Add the dependency to your extends
in nuxt.config
:
defineNuxtConfig({
extends: [
'@crtxio/darkmode'
]
})
How to use it
Components
<template>#
<DarkModeToggle />
<div class="dark:bg-black bg-white dark:text-white text-black">
Showcasing dark mode.
</div>
</template>