1.0.1 • Published 6 years ago

vue-stack-grid-component v1.0.1

Weekly downloads
42
License
-
Repository
github
Last release
6 years ago

vue-stack-grid

Grid layout components for Vue.js, like Pinterest

Live Demo

Demo

Install

You can install from npm or yarn

$ npm install vue-stack-grid-component
or
$ yarn add vue-stack-grid-component

Example

In Vue

<template>
  <div class="container">
    <StackGrid
      :columnWidth="200"
      :gutterX="20"
      :gutterY="20">
        <!-- you component like this -->
        <div class="stack-item"
          v-for="(item, index) in dataset" :key="index"
        >
          <!-- some thing have fixed height-->
        </div>
    </StackGrid>
  </div>
</template>
<script>
import StackGrid from 'vue-stack-grid-component'

export default {
  ...
  components: {
    StackGrid
  },
  ...
}
</script>

Props

NameTypeDefaultDescription
columnWidthNumber200Specify column width as an number(px)
gutterXNumber20Adds horizontal space between item elements
gutterYNumber20Adds vertical space between item elements
centerBooleantrueSpecify that all columns are vertically centered
easingString'easeOut'Specify a css valid transition-timing-function string
durationString'480ms'Specify duration of animation in ms
delayString'0ms'Specify delay of the initial animation in ms
orderBooleanfalseThe order of item, left-to-right order

Transition-Timing-Function

linear easeIn easeOut easeInOut easeInSine easeOutSine ...

License

Released under the MIT License.