{"_id":"@brustack/nuxt-theme-transitions","_rev":"6-4996b5055fd5e5eb768daf5b9c678125","name":"@brustack/nuxt-theme-transitions","dist-tags":{"latest":"2.2.0"},"versions":{"1.0.0":{"name":"@brustack/nuxt-theme-transitions","version":"1.0.0","keywords":["nuxt","nuxt-module","nuxt3","nuxt4","theme","theme-toggle","theme-switcher","dark-mode","dark-theme","color-mode","view-transitions","view-transitions-api","spread","fade","transition","animation"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@brustack/nuxt-theme-transitions@1.0.0","maintainers":[{"name":"bncodes","email":"neckel.bw+bncodes@gmail.com"},{"name":"brunoneckel","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/brustack/theme-transitions#readme","bugs":{"url":"https://github.com/brustack/theme-transitions/issues"},"dist":{"shasum":"0cbac85607a776e3f7d95f3b512443931ffa5150","tarball":"https://registry.npmjs.org/@brustack/nuxt-theme-transitions/-/nuxt-theme-transitions-1.0.0.tgz","fileCount":9,"integrity":"sha512-zcy2mQsS3KoA0tEX2KuX2PNVw5ioncJ5Iweyqzcc/vtGj7HAvrSuivS2fsUSc9lf/fLUA74Zu7aKvOxPoKLx+g==","signatures":[{"sig":"MEUCIBTAKfzNsTG62oUidh+Olc9HBfNDA9d/iC4CeuTTV/yvAiEAzCPE4CKndJVoD7FcDqYZxXnwmAwT044Ln7iMWRrPXvw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10133},"main":"./dist/module.mjs","type":"module","types":"./dist/types.d.mts","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"01b227b87a398951426f5c6ef03b1c2194d26c41","scripts":{"build":"nuxt-module-build build","prepack":"nuxt-module-build build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"brunoneckel","email":"neckel.bw@gmail.com"},"repository":{"url":"git+https://github.com/brustack/theme-transitions.git","type":"git","directory":"packages/nuxt"},"_npmVersion":"11.16.0","description":"Animated dark/light theme transitions for Nuxt using the View Transitions API","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@nuxt/kit":"^4.0.0","@brustack/theme-transitions-core":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.40","nuxt":"^4.0.0","@nuxt/cli":"^3.37.0","happy-dom":"^20.11.1","typescript":"^5.9.3","@vue/test-utils":"^2.4.11","@nuxt/module-builder":"^1.0.3"},"peerDependencies":{"nuxt":">=4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-theme-transitions_1.0.0_1785991455221_0.17814707624482606","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@brustack/nuxt-theme-transitions","version":"2.0.0","keywords":["nuxt","nuxt-module","nuxt3","nuxt4","theme","theme-toggle","theme-switcher","dark-mode","dark-theme","color-mode","view-transitions","view-transitions-api","spread","fade","transition","animation"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@brustack/nuxt-theme-transitions@2.0.0","maintainers":[{"name":"bncodes","email":"neckel.bw+bncodes@gmail.com"},{"name":"brunoneckel","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/brustack/theme-transitions#readme","bugs":{"url":"https://github.com/brustack/theme-transitions/issues"},"dist":{"shasum":"d97d19e7df0db426b4b8aa0e8b4db5ee921fce68","tarball":"https://registry.npmjs.org/@brustack/nuxt-theme-transitions/-/nuxt-theme-transitions-2.0.0.tgz","fileCount":9,"integrity":"sha512-J5FxlsqcZjXIwyTvksmPXoU3Gj4moI43oxeq/5PrbA6OGzse88vzARbh0tKNLqkOEknEBd6uDr9Nn+e5yZGz3w==","signatures":[{"sig":"MEYCIQDL7pyxZZ82PL9mTZOlFFi2DFUSS4jVjtkFFWKI3VMUfQIhAO5/g/UikCle397Qhm8iljFv+4Iuqonv6jhfLHxRQMDP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13028},"main":"./dist/module.mjs","type":"module","types":"./dist/types.d.mts","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"c069b2835f557aa987344894b7fafc3c904cca1c","scripts":{"build":"nuxt-module-build build","prepack":"nuxt-module-build build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"brunoneckel","email":"neckel.bw@gmail.com"},"repository":{"url":"git+https://github.com/brustack/theme-transitions.git","type":"git","directory":"packages/nuxt"},"_npmVersion":"11.16.0","description":"Animated dark/light theme transitions for Nuxt using the View Transitions API","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@nuxt/kit":"^4.0.0","@brustack/theme-transitions-core":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.40","nuxt":"^4.0.0","@nuxt/cli":"^3.37.0","happy-dom":"^20.11.1","typescript":"^5.9.3","@vue/test-utils":"^2.4.11","@nuxt/module-builder":"^1.0.3"},"peerDependencies":{"nuxt":">=3.21.11"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-theme-transitions_2.0.0_1786154605551_0.3073712847377117","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@brustack/nuxt-theme-transitions","version":"2.1.0","keywords":["nuxt","nuxt-module","nuxt3","nuxt4","theme","theme-toggle","theme-switcher","dark-mode","dark-theme","color-mode","view-transitions","view-transitions-api","spread","fade","transition","animation"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@brustack/nuxt-theme-transitions@2.1.0","maintainers":[{"name":"bncodes","email":"neckel.bw+bncodes@gmail.com"},{"name":"brunoneckel","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/brustack/theme-transitions#readme","bugs":{"url":"https://github.com/brustack/theme-transitions/issues"},"dist":{"shasum":"c0ef596b4848f6948777b4cc0489048325c754b9","tarball":"https://registry.npmjs.org/@brustack/nuxt-theme-transitions/-/nuxt-theme-transitions-2.1.0.tgz","fileCount":9,"integrity":"sha512-nPT2Yxa1yt5x182asMoMxRtA9/f8k14oCXbFWi0bfbabd2p9OtpG3rMlpXErLdH2ux+GIU4mm/cL7Rbdd/RC4Q==","signatures":[{"sig":"MEQCIGwSwgx/SOEDagZnXdDRsJDpxz1VVeZtQzTmRLi8mgd+AiBjfdoM2UZdjtQRH+QAmCdLDNXxGeo7Y8WQBR9z6GY/PA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13275},"main":"./dist/module.mjs","type":"module","types":"./dist/types.d.mts","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"337469cc20d9eb7f8cd87f6e67eeb6037673146a","scripts":{"build":"nuxt-module-build build","prepack":"nuxt-module-build build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"brunoneckel","email":"neckel.bw@gmail.com"},"repository":{"url":"git+https://github.com/brustack/theme-transitions.git","type":"git","directory":"packages/nuxt"},"_npmVersion":"11.16.0","description":"Animated dark/light theme transitions for Nuxt using the View Transitions API","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@nuxt/kit":"^4.0.0","@brustack/theme-transitions-core":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.40","nuxt":"^4.0.0","@nuxt/cli":"^3.37.0","happy-dom":"^20.11.1","typescript":"^5.9.3","@vue/test-utils":"^2.4.11","@nuxt/module-builder":"^1.0.3"},"peerDependencies":{"nuxt":">=3.21.11"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-theme-transitions_2.1.0_1786170490833_0.41592522231774653","host":"s3://npm-registry-packages-npm-production"}},"2.1.1":{"name":"@brustack/nuxt-theme-transitions","version":"2.1.1","keywords":["nuxt","nuxt-module","nuxt3","nuxt4","theme","theme-toggle","theme-switcher","dark-mode","dark-theme","color-mode","view-transitions","view-transitions-api","spread","fade","transition","animation","custom-themes"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@brustack/nuxt-theme-transitions@2.1.1","maintainers":[{"name":"bncodes","email":"neckel.bw+bncodes@gmail.com"},{"name":"brunoneckel","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/brustack/theme-transitions#readme","bugs":{"url":"https://github.com/brustack/theme-transitions/issues"},"dist":{"shasum":"5843660bbad51f65bee3a2365c79aa24dafb1d9e","tarball":"https://registry.npmjs.org/@brustack/nuxt-theme-transitions/-/nuxt-theme-transitions-2.1.1.tgz","fileCount":9,"integrity":"sha512-AwpMWnVlYYPjrsxDy8gaEHw4YIpjE+30BD4Rfjg1Gb3bfDAlpHFRms75LxbV5BFpxLz+6eGqnNEaJ8TBWUwH3A==","signatures":[{"sig":"MEUCIQDjGKLeE16Mr/Vsax42j1H6ql9/Rqu16kvQU7qz0ofm/AIgTmeavL3JGlUI2Wnl+E/bDH3AUrCFpEa9DSSvkqDmNEY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@brustack%2fnuxt-theme-transitions@2.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13279},"main":"./dist/module.mjs","type":"module","types":"./dist/types.d.mts","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"2bc2a22f2df2e0e2bfdc95948d058b063b65da06","scripts":{"build":"nuxt-module-build build","prepack":"nuxt-module-build build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:94af7cf8-a090-447b-bf88-f855cb37c9e7"}},"repository":{"url":"git+https://github.com/brustack/theme-transitions.git","type":"git","directory":"packages/nuxt"},"_npmVersion":"11.16.0","description":"Animated theme transitions for Nuxt using the View Transitions API","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@nuxt/kit":"^4.0.0","@brustack/theme-transitions-core":"^2.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.40","nuxt":"^4.0.0","@nuxt/cli":"^3.37.0","happy-dom":"^20.11.1","typescript":"^5.9.3","@vue/test-utils":"^2.4.11","@nuxt/module-builder":"^1.0.3"},"peerDependencies":{"nuxt":">=3.21.11"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-theme-transitions_2.1.1_1786252836321_0.004014302992267016","host":"s3://npm-registry-packages-npm-production"}},"2.1.2":{"name":"@brustack/nuxt-theme-transitions","version":"2.1.2","keywords":["nuxt","nuxt-module","nuxt3","nuxt4","theme","theme-toggle","theme-switcher","dark-mode","dark-theme","color-mode","view-transitions","view-transitions-api","spread","fade","transition","animation","custom-themes"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@brustack/nuxt-theme-transitions@2.1.2","maintainers":[{"name":"bncodes","email":"neckel.bw+bncodes@gmail.com"},{"name":"brunoneckel","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/brustack/theme-transitions#readme","bugs":{"url":"https://github.com/brustack/theme-transitions/issues"},"dist":{"shasum":"7c6888f05429fe5f4403fd647b9a39174cd4e71b","tarball":"https://registry.npmjs.org/@brustack/nuxt-theme-transitions/-/nuxt-theme-transitions-2.1.2.tgz","fileCount":9,"integrity":"sha512-bCfciZX9F+rLzpmtR1OlV0hMzHPikblRBb5luiL4a/UnPyz/ISkJjGmzdKrhOmBMkdb/YMMnEHyR0vREpIDf2w==","signatures":[{"sig":"MEYCIQDC5GHuC/SSfBqSBao1MJV8QFl2UwAtdbKBeTE4AREPEgIhAMXlQu1IRHCHLc1qfvl0zPQiRL6Y/Kpe0w560+HoFD2P","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@brustack%2fnuxt-theme-transitions@2.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13279},"main":"./dist/module.mjs","type":"module","types":"./dist/types.d.mts","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"4e1a122fcbdd3e99860a2081ba60873fbd15d0d2","scripts":{"build":"nuxt-module-build build","prepack":"nuxt-module-build build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:94af7cf8-a090-447b-bf88-f855cb37c9e7"}},"repository":{"url":"git+https://github.com/brustack/theme-transitions.git","type":"git","directory":"packages/nuxt"},"_npmVersion":"11.16.0","description":"Animated theme transitions for Nuxt using the View Transitions API","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@nuxt/kit":"^4.0.0","@brustack/theme-transitions-core":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.40","nuxt":"^4.0.0","@nuxt/cli":"^3.37.0","happy-dom":"^20.11.1","typescript":"^5.9.3","@vue/test-utils":"^2.4.11","@nuxt/module-builder":"^1.0.3"},"peerDependencies":{"nuxt":">=3.21.11"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-theme-transitions_2.1.2_1786264573700_0.7297496850224252","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@brustack/nuxt-theme-transitions","version":"2.2.0","description":"Animated theme transitions for Nuxt using the View Transitions API","author":{"name":"Bruno Neckel"},"license":"MIT","type":"module","sideEffects":false,"main":"./dist/module.mjs","types":"./dist/types.d.mts","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"repository":{"type":"git","url":"git+https://github.com/brustack/theme-transitions.git","directory":"packages/nuxt"},"publishConfig":{"access":"public"},"peerDependencies":{"nuxt":">=3.21.11"},"dependencies":{"@brustack/theme-transitions-core":"^3.1.0","@nuxt/kit":"^3.21.11 || ^4.0.0"},"devDependencies":{"@nuxt/cli":"^3.37.0","@nuxt/module-builder":"^1.0.3","@vue/test-utils":"^2.4.11","happy-dom":"^20.11.1","nuxt":"^4.0.0","typescript":"^5.9.3","vue":"^3.5.40"},"scripts":{"build":"nuxt-module-build build","prepack":"nuxt-module-build build","typecheck":"tsc --noEmit"},"keywords":["nuxt","nuxt-module","nuxt3","nuxt4","theme","theme-toggle","theme-switcher","dark-mode","dark-theme","color-mode","view-transitions","view-transitions-api","spread","fade","transition","animation","custom-themes"],"gitHead":"4845a776a8ab12fe65a58024ee8fbb6ba23d75fd","_id":"@brustack/nuxt-theme-transitions@2.2.0","bugs":{"url":"https://github.com/brustack/theme-transitions/issues"},"homepage":"https://github.com/brustack/theme-transitions#readme","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-Lc5hKv8YccR8yEcgP/RKthjRzhx7AqLh1NS4LzX9+CYvW6zIKDiwBF/bLFgmaA08QG6nxah6yEM35TxT2aqQ8Q==","shasum":"31610cfda838538b836ba5997abb4d59c88286fc","tarball":"https://registry.npmjs.org/@brustack/nuxt-theme-transitions/-/nuxt-theme-transitions-2.2.0.tgz","fileCount":9,"unpackedSize":12997,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@brustack%2fnuxt-theme-transitions@2.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBbnN/6Anbj53C5hFpdFYh5FUFrn//9aTooCwnJdV1Q+AiEAksyk3UZT1ITF4Lwc+UFvx8fVHvUlOU8/ZNa78+ITeQ4="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:94af7cf8-a090-447b-bf88-f855cb37c9e7"}},"directories":{},"maintainers":[{"name":"bncodes","email":"neckel.bw+bncodes@gmail.com"},{"name":"brunoneckel","email":"neckel.bw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nuxt-theme-transitions_2.2.0_1786564427114_0.3687812588052719"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-06T04:44:15.035Z","modified":"2026-08-12T19:53:47.675Z","1.0.0":"2026-08-06T04:44:15.360Z","2.0.0":"2026-08-08T02:03:25.726Z","2.1.0":"2026-08-08T06:28:10.970Z","2.1.1":"2026-08-09T05:20:36.469Z","2.1.2":"2026-08-09T08:36:13.863Z","2.2.0":"2026-08-12T19:53:47.316Z"},"bugs":{"url":"https://github.com/brustack/theme-transitions/issues"},"author":{"name":"Bruno Neckel"},"license":"MIT","homepage":"https://github.com/brustack/theme-transitions#readme","keywords":["nuxt","nuxt-module","nuxt3","nuxt4","theme","theme-toggle","theme-switcher","dark-mode","dark-theme","color-mode","view-transitions","view-transitions-api","spread","fade","transition","animation","custom-themes"],"repository":{"type":"git","url":"git+https://github.com/brustack/theme-transitions.git","directory":"packages/nuxt"},"description":"Animated theme transitions for Nuxt using the View Transitions API","maintainers":[{"name":"bncodes","email":"neckel.bw+bncodes@gmail.com"},{"name":"brunoneckel","email":"neckel.bw@gmail.com"}],"readme":"# nuxt-theme-transitions\n\n[![made by brustack](https://img.shields.io/badge/MADE%20BY%20brustack-000000.svg?style=for-the-badge&labelColor=000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMjYuNzcgMjI2Ljc3Ij48cG9seWdvbiBmaWxsPSIjRjRGMkVEIiBwb2ludHM9IjE1My43MyA4My4zOSAxNTMuNzMgMTUzLjczIDgzLjM5IDE1My43MyA4My4zOSAyMTMuNzMgMjEzLjczIDIxMy43MyAyMTMuNzMgODMuMzkgMTUzLjczIDgzLjM5Ii8%2BPHJlY3QgZmlsbD0iI0Y0RjJFRCIgeD0iODMuMzkiIHk9IjEzLjA0IiB3aWR0aD0iNjAiIGhlaWdodD0iNjAiLz48cmVjdCBmaWxsPSIjRjRGMkVEIiB4PSIxMy4wNCIgeT0iODMuMzkiIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIvPjxyZWN0IGZpbGw9IiNGNEYyRUQiIHg9IjgzLjM5IiB5PSI4My4zOSIgd2lkdGg9IjYwIiBoZWlnaHQ9IjYwIi8%2BPC9zdmc%2BCg%3D%3D)](https://github.com/brustack)\n[![npm version](https://img.shields.io/npm/v/@brustack/nuxt-theme-transitions.svg?style=for-the-badge&labelColor=000000)](https://www.npmjs.com/package/@brustack/nuxt-theme-transitions)\n[![license](https://img.shields.io/npm/l/@brustack/nuxt-theme-transitions.svg?style=for-the-badge&labelColor=000000)](https://github.com/brustack/theme-transitions/blob/main/packages/nuxt/LICENSE)\n\nNuxt module for animated theme transitions using the View Transitions API.\n\n- ✅ Multiple effects to choose from\n- ✅ Zero flash of the wrong theme on load\n- ✅ Syncs automatically with OS `prefers-color-scheme`\n- ✅ Custom themes beyond light/dark\n- ✅ Auto-imported `useThemeTransition`, zero-config Nuxt module\n- ✅ Works with Nuxt 3 and Nuxt 4\n\n<br>\n\n<p align=\"center\">\n  <img src=\"../../.github/assets/demo.gif\" alt=\"Demo: clicking anywhere on the page triggers an animated theme transition originating from the cursor\" />\n</p>\n\n<p align=\"center\">Check out the <a href=\"https://theme-transitions.brustack.dev\">Live Example</a> to try it for yourself.</p>\n\n## Install\n\n```sh\nnpm install @brustack/nuxt-theme-transitions\n# or\npnpm add @brustack/nuxt-theme-transitions\n# or\nyarn add @brustack/nuxt-theme-transitions\n```\n\n```ts\n// nuxt.config.ts\nexport default defineNuxtConfig({\n  modules: ['@brustack/nuxt-theme-transitions'],\n})\n```\n\nPrefer to see it running first?\n\n```sh\ngit clone https://github.com/brustack/theme-transitions.git\ncd theme-transitions\nnpm run install:nuxt-demo\nnpm run dev:nuxt-demo\n```\n\n## Usage\n\n```vue\n<script setup lang=\"ts\">\nconst { theme, isAnimating, toggleTheme } = useThemeTransition()\n</script>\n\n<template>\n  <button :disabled=\"isAnimating\" @click=\"toggleTheme\">\n    {{ theme }}\n  </button>\n</template>\n```\n\nBinding `toggleTheme` directly to `@click` works because it accepts the native `MouseEvent` and derives the spread effect's origin from the click position automatically. `originFromElement(elementRef)` is auto-imported too, use it instead if you want to animate from an element's center rather than the click position.\n\n## Styling\n\n`useThemeTransition` applies the current theme's name (`dark`, `light`, or a custom name, see Custom themes below) as a class on `<html>`. Style your palette off that class with any approach.\n\n### CSS variables\n\n```css\n:root {\n  --bg: #ffffff;\n  --text: #111111;\n}\n\nhtml.dark {\n  --bg: #0b0b10;\n  --text: #f4f2ed;\n}\n\nhtml.sepia {\n  --bg: #f4ecd8;\n  --text: #4b3621;\n}\n\nbody {\n  background: var(--bg);\n  color: var(--text);\n}\n```\n\n### Tailwind\n\nSet `darkMode: 'class'` in your Tailwind config (see Install above), then map your color tokens to the CSS variables above:\n\n```js\n// tailwind.config.js\nmodule.exports = {\n  darkMode: 'class',\n  theme: {\n    extend: {\n      colors: {\n        bg: 'var(--bg)',\n        text: 'var(--text)',\n      },\n    },\n  },\n};\n```\n\n## Configuration (optional)\n\n| Variant | `duration` | `easing` |\n|---|:---:|:---:|\n| `spread` | `'1s'` | ❌ |\n| `fade` (default) | `'400ms'` | `'ease'` |\n| `none` | ❌ | ❌ |\n\n```ts\n// nuxt.config.ts\nexport default defineNuxtConfig({\n  modules: ['@brustack/nuxt-theme-transitions'],\n  themeTransition: {\n    variant: 'spread',\n    duration: '1s',\n  },\n})\n```\n\nRestart the dev server after changing `themeTransition`.\n\n`toggleTheme`/`setTheme` also accept a `MouseEvent` (as shown in Usage) or an explicit options object, e.g. `{ origin, variant, duration }`, to override the configured value for just that one call. `origin` is required for `spread`, derive it with `originFromEvent(event)` or `originFromElement(el)`.\n\n### Custom themes\n\nRegister extra theme names beyond `light`/`dark`/`system` via `themeTransition.themes`:\n\n```ts\n// nuxt.config.ts\nexport default defineNuxtConfig({\n  modules: ['@brustack/nuxt-theme-transitions'],\n  themeTransition: {\n    themes: ['sepia', 'sunset'],\n  },\n})\n```\n\n`setTheme('sepia')` then applies a `sepia` class the same way `light`/`dark` do (see Styling above). `themes` always includes `['light', 'dark', 'system', ...your custom names]` once mounted, useful for building a theme switcher. `toggleTheme()` is unaffected, it always flips between `light` and `dark`.\n\n## API\n\n| | |\n|---|---|\n| `toggleTheme(eventOrOptions?)` | Switch between light and dark |\n| `setTheme(mode, eventOrOptions?)` | Set `light`, `dark`, `system`, or a custom theme name |\n| `theme` | Current resolved theme: `'light'`, `'dark'`, or a custom theme name |\n| `mode` | Current preference: `'light'`, `'dark'`, `'system'`, or a custom theme name |\n| `isAnimating` | `true` while a transition is running |\n| `themes` | All registered theme names: `['light', 'dark', 'system', ...custom]` (built-ins only before mount) |\n| `originFromEvent(event)` | Click position for spread |\n| `originFromElement(el)` | Element center for spread |\n\n## Notes\n\n- `useThemeTransition` only creates the underlying controller after the component mounts, `theme`/`mode`/`isAnimating` start as safe defaults (`'light'`/`'system'`/`false`) via Nuxt's `useState`. This means it's safe to use in SSR/universal rendering by default, no hydration mismatch, since nothing controller-dependent renders until the client takes over.\n\n## Known issues\n\n- Chrome 150 has a regression where the `spread` effect's clip-path animation can render from the wrong position after the browser window moves between displays with different DPI/scaling. This is a Chrome bug, not something this package can work around. It's already fixed upstream and verified in Chrome Canary; the fix should reach the Stable channel in a future release. See [Chromium issue #535696703](https://issues.chromium.org/issues/535696703).","readmeFilename":"README.md"}