0.1.2 • Published 4 years ago

vuetify-floating-image-card v0.1.2

Weekly downloads
14
License
-
Repository
github
Last release
4 years ago

vuetify-floating-image-card

demo

The picture used in demo is from vuetify document. demo-pic1

<template>
  <v-app>
    <div class="d-flex justify-center mt-10">
      <FloatingImageCard
        :cardWidth="450"
        cardTitle="floating image card"
        cardSubTitle="using vuetify card"
        imageSrc="https://cdn.vuetifyjs.com/images/cards/docks.jpg"
      >
        <template #cardText>
          build something great
        </template>
        <template #cardActions>
          <v-btn text>OK</v-btn>
          <v-btn text>CANCEL</v-btn>
        </template>
      </FloatingImageCard>
    </div>
  </v-app>
</template>

<script lang="ts">
import Vue from "vue";
import FloatingImageCard from "vuetify-floating-image-card";

export default Vue.extend({
  components: {
    FloatingImageCard
  }
});
</script>

getting started

make sure you have installed vuetify in your project

installation

yarn add vuetify-floating-image-card
//or
npm i vuetify-floating-image-card

import

<script>
import FloatingImageCard from "vuetify-floating-image-card";

export default Vue.extend({
  components: {
    FloatingImageCard
  }
});
</script>

properties

css classes

prop nametyperequireddefaultabout
rootClassstringfalse""Class for v-card(root element of this component)
innerImageTitleClassstringfalse""Class for v-card-title inside the v-img. This prop is available when you provide innerImageTitle
innerImageSubTitleClassstringfalse""Class for v-card-subtitle inside the v-img. This prop is available when you provide innerImageSubTitle
cardTitleClassstringfalse""Class for v-card-title. This prop is available when you provide cardTitle
cardSubTitleClassstringfalse""Class for v-card-subtitle. This prop is available when you provide cardSubTitle
cardTextClassstringfalse""Class for v-card-text wrapping the cardText slot. Only available when you are using cardText slot
cardActionsClassstringfalse""Class for v-card-actions wrapping the cardActions slot. Only available when you are using cardActions slot

css styles

prop nametyperequireddefaultabout
cardStyleobject(css properties)false{}style object for v-card(root element of this component). Don't define padding(it will break the layout of floating image)
innerImageTitleStyleobject(css properties)false{}style object for v-card-title inside the v-img. This prop is available when you provide innerImageTitle
innerImageSubTitleStyleobject(css properties)false{}style object for v-card-subtitle inside the v-img. This prop is available when you provide innerImageSubTitle
cardTitleStyleobject(css properties)false{}style object for v-card-title. This prop is available when you provide cardTitle
cardSubTitleStyleobject(css properties)false{}style object for v-card-subtitle. This prop is available when you provide cardSubTitle
cardTextStyleobject(css properties)false{}style object for v-card-text wrapping the cardText slot. Only available when you are using cardText slot
cardActionsStyleobject(css properties)false{}style object for v-card-actions wrapping the cardActions slot. Only available when you are using cardActions slot

sizing props

prop nametyperequireddefaultabout
cardWidthstring or numberfalse""width of root v-card
maxCardWidthstring or numberfalse""max-width of root v-card
minCardWidthstring or numberfalse""min-width of root v-card
cardHeightstring or numberfalse""height of root v-card
maxCardHeightstring or numberfalse""max-height of root v-card
minCardHeightstring or numberfalse""min-height of root v-card

texts

prop nametyperequireddefaultabout
innerImageTitlestringfalse""title inside the image(inside the v-card-title)
innerImageSubTitlestringfalse""subtitle inside the image(inside the v-card-subtitle)
cardTitlestringfalse""card title (inside the v-card-title)
cardSubTitlestringfalse""card subtitle (inside the v-card-subtitle)

other

prop nametyperequireddefaultabout
imageSrcstringtrue""src for image
mediaOffsetsnumberfalse16offset of image to card edges
mediaBorderRnumberfalse4border radius of image

slots

cardText

  • slot inside the v-card-text
  • put your main contents here

cardActions

  • slot inside the v-card-actions
  • put your card actions here
0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago