vue-background

1.0.0 • Public • Published

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>

Package Sidebar

Install

npm i vue-background

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

17.6 kB

Total Files

5

Last publish

Collaborators

  • iman-malekian