Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

v-class-name

1.0.8 • Public • Published

vue-class-name

Add CSS class name which based on name property.

import vueClassName from 'v-class-name'
Vue.use(vueClassName)
<template>
  <div v-class-name>
    <h1 v-class-name="'_Heading'">
      heading
    </h1>
    <div v-class-name="'_Content'">
      content
    </div>
  </div>
</template>
 
<script>
export default {
  name: 'MyComponent'
}
</script> 

👇

<div class="MyComponent">
  <h1 class="MyComponent_Heading">
    heading
  </h1>
  <div class="MyComponent_Content">
    content
  </div>
</div>

Keywords

install

npm i v-class-name

Downloadsweekly downloads

0

version

1.0.8

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability