1.0.1 • Published 2 years ago

vue3-counter v1.0.1

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

Vue 3 Counter 🔢

[banner]

A highly customised numeric counter component for Vue 3 Applications.

✨ Features

  • ✨ Customizable
  • ✨ Multiple icons and style alignments
  • ✨ Auto adjusted input width
  • ✨ Support Typescript

🎯 install

npm install vue3-counter --save

🚀 Usage

Import and Use

<script setup lang="ts">
import Counter from 'vue3-counter'
const config = {
    inputColor: '#3A78EF',
    countUpColor: '#3A78EF',
    countDownColor: '#3A78EF',
    initial: 5,
    arrow: true,
    vertical: false,
    max: 10,
    min: 0
}
</script>

<template>
    <Counter :config="config" @change="handleChange($event)" />
</template>

Customization

config prop properties

NameTypeDefaultDescription
inputColorstring"#212121"Background color of the input field.
textColorstring"#FFFFFF"Color of the input text.
countUpColorstring"#212121"Color of the count up button.
countDownColor  string"#212121"Color of the count down button.
initialnumber0Initial value of the counter.
minnumberundefinedMinimum value of the counter.
maxnumberundefinedMaximum value of the counter.
arrowbooleanfalseIf true arrows would show intead of +,-
verticalbooleanfalseVertical or horizontal

events

NameFires when
countUpCount up button is clicked.
countDown   Count down button is clicked.
inputUser types on the input.
changeEverytime the value changes.

License

MIT

1.0.1

2 years ago

1.0.0

2 years ago