@juliendu11/vue-2-credit-card

1.0.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @juliendu11/vue-2-credit-card

Weekly Downloads

1

Version

1.0.3

License

none

Unpacked Size

926 kB

Total Files

12

Last publish

Collaborators

  • juliendu11