Skip to content

imanmalekian31/vue-background

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue background

vue-background is a simple directive that allows you to apply TailwindCss colors to an element's background.

Installation

# npm
npm install vue-background
# yarn
yarn add vue-background

Usage

import bgDirective from "vue-background";

const app = createApp(App);
app.use(bgDirective);
app.mount("#app");
<template>
  <h1 v-bg="'slate-500'" class="text-3xl font-bold underline">Hello world!</h1>
  <button v-bg="'lime-600'">Submit</button>
</template>

About

vue-background is a simple directive that allows you to apply TailwindCss colors to an element's background.

Topics

Resources

Stars

Watchers

Forks