0.0.4 • Published 3 years ago

vue-draggable-card v0.0.4

Weekly downloads
22
License
-
Repository
github
Last release
3 years ago

vue-draggable-card

Install

npm i vue-draggable-card

Usage

import Vue from "vue";
import { VueDraggableCard } from "vue-draggable-card";

export default {
  components: {
    VueDraggableCard,
  },
};
<vue-draggable-card>
  <template v-slot:content>
    <h1> Your Title </h1>
  </template>
</vue-draggable-card>

API

Props

NameTypeDefaultDescription
titlestringnullTitle of the card
subtitlestringnullSubtitle of the card
textstringnullText content of the card
imagestringnullSource of the card image
randomTiltBooleanfalseEnable random card rotation
randomMaxNumber15Maximum rotation in degree
randomMinNumber10Minimum rotation in degree

Events

NameAttributesListen toDescription
dragevent@dragEmitted as card position changes.

Slots

NameDescription
contentSlot for inner content of the card

Examples

https://codepen.io/mevcj/pen/VwmwLwR

License

MIT