Skip to content

VictorioCapucco/vue-brazil-money

Repository files navigation

npm npm npm

vue-brazil-money

If you just want a Vue 3 library to format brazillian money and don't want to configure anything, this library is perfect to you. https://www.npmjs.com/package/vue-brazil-money

npm install vue-brazil-money

How to use

<template>
    <money v-model="test" />
</template>

<script>
import money from "vue-brazil-money";
export default {
  name: "App",
  data() {
    return {
      test: "",
    };
  },
  components: {
    money,
  },
};
</script>

Attrs

You can pass attributes to input, like disabled, class etc
<template>
  <div>
    <money v-model="test" id="money-input" class="text-red" />
  </div>
</template>

<script>
import money from "vue-brazil-money";
export default {
  name: "App",
  data() {
    return {
      test: "",
    };
  },
  components: {
    money,
  },
};
</script>
<style>
.text-red {
  color: red;
}
</style>

Props

You can inform the decimal places. The default value is 2
<money v-model="test" :decimalPlaces="5" />

Example

Screenshot from 2022-12-21 21-46-58

Authors

References

"Como criar e publicar uma biblioteca (em Vue) no npm?" -> https://medium.com/tableless/como-criar-e-publicar-uma-biblioteca-em-vue-no-npm-2dff8271ca7d

About

If you just want a Vue 3 library to format brazillian money and don't want to configure anything, this library is perfect to you.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages