diff --git a/components/content/docs/getting-started/dark-mode/DarkModeForNuxt.vue b/components/content/docs/getting-started/dark-mode/DarkModeForNuxt.vue
index 400de16c..e6b10a8c 100644
--- a/components/content/docs/getting-started/dark-mode/DarkModeForNuxt.vue
+++ b/components/content/docs/getting-started/dark-mode/DarkModeForNuxt.vue
@@ -8,7 +8,11 @@ import {
NuxtModuleAddCode,
nuxtThemeSwitcherCode,
} from "./darkModeCodes";
-import ThemeSwitcherForDoc from "./ThemeSwitcherForDoc.vue";
+const colorMode = useColorMode();
+
+const toggleTheme = () => {
+ colorMode.preference = colorMode.preference === "dark" ? "light" : "dark";
+};
@@ -80,7 +84,23 @@ import ThemeSwitcherForDoc from "./ThemeSwitcherForDoc.vue";
-
+
+
+
+
+
diff --git a/components/content/docs/getting-started/dark-mode/DarkModeForVue.vue b/components/content/docs/getting-started/dark-mode/DarkModeForVue.vue
index 03658535..cc75d323 100644
--- a/components/content/docs/getting-started/dark-mode/DarkModeForVue.vue
+++ b/components/content/docs/getting-started/dark-mode/DarkModeForVue.vue
@@ -6,7 +6,12 @@ import {
vueThemeSwitcherComponentCode,
vueUseInstallForVue,
} from "./darkModeCodes";
-import ThemeSwitcherForDoc from "./ThemeSwitcherForDoc.vue";
+
+const colorMode = useColorMode();
+
+const toggleTheme = () => {
+ colorMode.preference = colorMode.preference === "dark" ? "light" : "dark";
+};
@@ -44,7 +49,23 @@ import ThemeSwitcherForDoc from "./ThemeSwitcherForDoc.vue";
-
+
+
+
+
+