Home

Awesome

<div align="center"> <img alt="Vue Framework" src="https://vuejs.org/images/logo.png" width="100"> <h1>Vue Grid Responsive</h1>

Responsive grid system based on Bootstrap for Vue.

</div> <br /> <br />

npm versionLicense: MITBuild Status

Installation

NPM

vue 2.0

npm i vue-grid-responsive
// OR
yarn add vue-grid-responsive

vue 3.0

npm i vue-grid-responsive@next
// OR
yarn add vue-grid-responsive@next

CDN

vue 2.0

<script src="https://unpkg.com/vue-grid-responsive"></script>

vue 3.0

<script src="https://unpkg.com/vue-grid-responsive@next"></script>

Manual

You can also download and import it manually

<script src="/vue-grid-responsive/dist/vue-grid-reponsive.min.js"></script>

Module import

vue 2.0

import Vue from 'vue';
import { Row, Column, Hidden } from 'vue-grid-responsive';

Vue.component('row', Row);
Vue.component('column', Column);
Vue.component('hidden', Hidden);

vue 3.0

import { createApp } from 'vue';
import { Row, Column, Hidden } from 'vue-grid-responsive';

const app = createApp(App);

app.component('row', Row);
app.component('column', Column);
app.component('hidden', Hidden);

Examples

An example of how to use the library:

<template>
  <row container :gutter="12">
    <column :xs="12" :md="4" :lg="3"> xs=12 md=4 lg=3 </column>
    <column :xs="12" :md="4" :lg="3"> xs=12 md=4 lg=3 </column>
    <column :xs="12" :md="4" :lg="3"> xs=12 md=4 lg=3 </column>
    <column :xs="12" :md="4" :lg="3"> xs=12 md=4 lg=3 </column>
  </row>
</template>

An example how to use offset in addition with a columns:

<template>
  <row container :gutter="12">
    <column :md="8" :mdOffset="2" :lg="6" :lgOffset="3"> </column>
  </row>
</template>

Using the hidden component:

<template>
  <div>
    <hidden :xs="true"> hidden xs </hidden>
    <hidden :md="true"> hidden md </hidden>
    <hidden :xl="true"> hidden xl </hidden>
  </div>
</template>

Demo Link

Local demo:

git clone https://github.com/andrelmlins/vue-grid-responsive.git
cd vue-grid-responsive
npm && npm run dev

Properties

Component props:

Row Component props

PropDefaultTypeDescription
gutter-numberGrid spacing in the container
columns12numberSetting columns count in the container

Column Component props

Basic Size

PropDefaultTypeDescription
xs-numberSize in extra small screen
sm-numberSize in small screen
md-numberSize in medium screen
lg-numberSize in large screen
xl-numberSize in extra large screen
order-numberOrder the columns

Offset

PropDefaultTypeDescription
xsOffset-numberOffset in extra small screen
smOffset-numberOffset in small screen
mdOffset-numberOffset in medium screen
lgOffset-numberOffset in large screen
xlOffset-numberOffset in extra large screen

Hidden Component props

PropDefaultTypeDescription
xs-booleanHidden in extra small size
sm-booleanHidden in small size
md-booleanHidden in medium size
lg-booleanHidden in large size
xl-booleanHidden in extra large size

NPM Statistics

Download stats for this NPM package

NPM

License

Vue Grid Responsive is open source software licensed as MIT.