TvThemeButton v1.0.0

Variations:

A simple and interactive toggle button that switches between light and dark themes, allowing you to easily integrate theme switching into your application.

Code:

html
copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
      <!-- This component save theme "light" or "dark" in the localStorage  -->
<template>
  <tv-theme-button @change-theme="changeValue"/>
</template>

<script setup>
import TvThemeButton from "@todovue/tv-the-button";

const changeValue = (value) => {
  console.log(value); // return light or dark
};
</script>