vue-2-credit-card
A simple credit card component with interaction for Vue JS 2 with v-model
Install
npm i @juliendu11/vue-2-credit-card
Setup
import Vue from 'vue'
import VueCreditCard from '@juliendu11/vue-2-credit-card'
Vue.use(VueCreditCard)
Or locally in any component
import { VueCreditCard } from '@juliendu11/vue-2-credit-card'
How to use ?
<template>
<VueCreditCard v-model="creditCardValues"></VueCreditCard>
</template>
<script>
export default {
data(){
return {
creditCardValues: {
cvv: '',
expire: '',
name: '',
number: ''
}
}
}
}
</script>
Developement
$ git clone https://github.com/juliendu11/vue-2-credit-card.git
$ cd vue-2-credit-card
$ npm i
Storybook
For visual testing, this project contains storybook which you can run by running the command
$ npm run storybook
Jest
$ npm run test