Skip to content

TvThemeButton is a lightweight and customizable Vue component that allows users to switch between light and dark themes in your application. Designed for modern interfaces, it emits the selected theme and integrates seamlessly into any Vue 3 project.

License

Notifications You must be signed in to change notification settings

TODOvue/tv-theme-button

Repository files navigation

TODOvue logo

TODOvue ThemeButton

vThemeButton is a lightweight and customizable Vue component that allows users to switch between light and dark themes in your application. Designed for modern interfaces, it emits the selected theme and integrates seamlessly into any Vue 3 project.

npm Netlify Status npm npm GitHub GitHub Release Date

Table of Contents

Installation

Install with npm or yarn

npm install @todovue/tv-theme-button
yarn add @todovue/tv-theme-button

Import

import TvThemeButton from '@todovue/tv-theme-button'

You can also import it directly in the main.js file, so you don't have to import it in the pages

import { createApp } from "vue";
import App from "./App.vue";
import TvThemeButton from '@todovue/tv-theme-button'

const app = createApp(App);
app.component("TvThemeButton", TvThemeButton);
app.mount("#app");

Usage

<template>
  <tv-theme-button
    @change-theme="changeValue"
  />
</template>

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

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

Events

Name Description
change-theme Return the value of the theme selected.

Development

Clone the repository and install the dependencies

git clone https://github.com/TODOvue/tv-theme-button.git
cd tv-theme-button
yarn install

License

MIT

About

TvThemeButton is a lightweight and customizable Vue component that allows users to switch between light and dark themes in your application. Designed for modern interfaces, it emits the selected theme and integrates seamlessly into any Vue 3 project.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors 2

  •  
  •