vue-magic-grid

This is a Vue.js port of @e-oj 's Magic Grid

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
vue-magic-grid
175210.0.45 years ago5 years agoMinified + gzip package size for vue-magic-grid in KB

Readme

Vue-Magic-Grid
GitHub forks GitHub stars GitHub issues GitHub license JavaScript Style Guide This is a Vue.js port of @e-oj's Magic Grid. Please check the /test folder for a example. If you use images, make sure they have a set height, otherwise the grid will calculate weirdly.

Setup

Install & Register the component ```js $ npm i -S vue-magic-grid ``` ```js import MagicGrid from 'vue-magic-grid' Vue.use(MagicGrid) ```

Use

```html v-for="(post, i) in posts"
:key="i"
:title="post.title"
:body="post.body" />
```

Props

| Prop | Default | Comment | |:------------|:----------|:---------------------------| | wrapper | wrapper | Wrapper class | | gap | 32 | Gap between elements | | maxCols | 5 | Max number of colums | | maxColWidth | 280 | Max width of columns | | animate | false | Animate item positioning | js-standard-style Cheers, ImLinus