1.4.0 • Published 3 years ago

vue-product-card v1.4.0

Weekly downloads
5
License
ISC
Repository
-
Last release
3 years ago

Vue Product Card

Simple and can be customized product card component

Examples

vue-product-card

Usage

Install VueProductCard for Vue.js through npm:

npm install vue-product-card

Mount with global

import Vue from "vue";
import VueProductCard from 'vue-product-card'

Vue.component("vue-product-card",VueProductCard)

Mount with component

<template>
  <vue-product-card
    :infos="infos"
    :cardColor="cardColor"
    :stripColor="stripColor"
    :buttonColor="buttonColor"
    :textColor="textColor"
    :numberShow="true"
  ></vue-product-card>
</template>

<script>
import VueProductCard  from 'vue-product-card'
export default {
  components:{
      "vue-product-card" : VueProductCard
  },
  data() {
    return {
      cardColor: "#313131",
      stripColor: "#35AFFB",
      buttonColor: "#35AFFB",
      textColor: "#fff",
      infos: [
        {
          src: "foo.png",
          title: "Headphone",
          price: "89.99₺",
          url: "",
          btnText: "Satın Al",
        },
      ],
    };
  },
};
</script>

Props

NamesTypesOptionsDefault
infos(required)Array{src:"foo.png", title:"card title", price:"89,99$", url:"https://example.com", btnText:"Buy Now"}
cardColor(required)StringcardColor:"#000" | cardColor:"black"
stripColor(required)StringstripColor:"#000" | stripColor:"black"
buttonColor(required)StringbuttonColor:"#000" | buttonColor:"black"
textColor(optional)StringtextColor:"#000" | textColor:"black""#ffffff"
numberShow(optional)Booleanfalse | truetrue