0.0.2 • Published 8 years ago

wovue-cols v0.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

Cols

The wovue-cols module contains the grid system components.

Install using npm:

$ npm install --save wovue-cols

Note this will only works with webpack build system.

Note The wv-cols component use negative margins, you will need a root element overflowing the wv-cols component, or it will cause horizontal scroll.

Usage

require('wovue-cols/src/_components.cols.scss')

import { WvCols, WvCol } from 'wovue-cols'

new Vue({
  components: {
    WvCols,
    WvCol
  }
})
<div class="u-overflow-hidden">
  <wv-cols :gutter="4" vertical-align="middle">
    <wv-col size="6" md="2" lg="8">
      <!-- here your content -->
    </wv-col>
    <wv-col size="6" md="10" lg="4">
      <!-- here your content -->
    </wv-col>
    <wv-col size="12">
      <wv-cols :gutter="2">
        <wv-col size="3">
          <!-- here your content -->
        </wv-col>
        <wv-col size="7">
          <!-- here your content -->
        </wv-col>
      </wv-cols>
    </wv-col>
  </wv-cols>
</div>

Props

cols

NameTypeDefaultDescription
verticalAlignString, BooleanfalseColums vertical align. The support values are 'middle' and 'stretch'
gutterNumber, String, BooleanfalseAlter spacing between colums. The support values are 1, 2, 3, 4, 5, 6

col

NameTypeDefaultDescription
sizeNumber, String, BooleanfalseColumn size. The support values are 'auto', 'fit', 1, 2, 3, ...12
responsiveObject, BooleanfalseCustom breakpoints and values.
xsNumber, String, BooleanfalseColumn size for xs devices. The support values are 'auto', 'fit', 1, 2, 3, ...12
smNumber, String, BooleanfalseAs above.
mdNumber, String, BooleanfalseAs above.
lgNumber, String, BooleanfalseAs above.
xlNumber, String, BooleanfalseAs above.

Breakpoints

KeyValue
xs320px
sm480px
md768px
lg992px
xl1200px