0.1.3 • Published 5 years ago

@hzimm/a-grid v0.1.3

Weekly downloads
4
License
-
Repository
-
Last release
5 years ago

a-grid

a-grid is a simple grid system for Vue.js.

This library adds a 12 point grid system built using flex-box. It contains five types of media breakpoints that are used for targeting specific screen sizes and orientations.

DeviceCodeTypesRange
Extra smallxsSmall to large handsets< 600px
Smallsmsmall to medium tablet600px ~ 960px
MediummdLarge tablet to laptop960px ~ 1264px
LargelgDesktop1264px ~ 1904px
Extra largexl4k and ultra-wides> 1904px

Usage

The library adds four basic components:

  • a-container provides the ability to center and horizontally pad your site's contents. You can also use the fluid prop to fully extend the container across all viewport and device sizes.
  • a-row is a wrapper component for a-col. It utilizes flex properties to control the layout and flow of its inner columns.
  • a-col is a content holder that must be a direct child of a-row.
  • a-spacer allows to leave a flexible space between components.
<template>
  <a-container>
    <a-row no-gutters>
      <a-col
        a-for="n in 3"
        :key="n"
        cols="12"
        sm="4"
      >
        One of three columns
      </a-col>
    </a-row>
  </a-container>
</template>

a-container

NameTypeDefaultDescription
fluidbooleanfalseRemoves viewport maxinmun-width size breakpoints.
idstringundefinedSets the DOM id on the component.
tagstringdivSpecify a custom tag used on the root element.

a-row

NameTypeDefaultDescription
alignstringundefinedApplies the align-items css property. Available options are start, center, end, baseline and stretch.
align-contentstringundefinedApplies the align-content css property. Available options are start, center, end, space-between, space-around and stretch.
align-content-lgstringundefinedChanges the align-content property on large and greater breakpoints.
align-content-mdstringundefinedChanges the align-content property on medium and greater breakpoints.
align-content-smstringundefinedChanges the align-content property on small and greater breakpoints.
align-content-xlstringundefinedChanges the align-content property on extra large and greater breakpoints.
align-lgstringundefinedChanges the align-items property on large and greater breakpoints.
align-mdstringundefinedChanges the align-items property on medium and greater breakpoints.
align-smstringundefinedChanges the align-items property on small and greater breakpoints.
align-xlstringundefinedChanges the align-items property on extra large and greater breakpoints.
densebooleanfalseReduces the gutter between v-cols.
justifystringundefinedApplies the justify-content css property. Available options are start, center, end, space-between and space-around.
justify-lgstringundefinedChanges the justify-content property on large and greater breakpoints.
justify-mdstringundefinedChanges the justify-content property on medium and greater breakpoints.
justify-smstringundefinedChanges the justify-content property on small and greater breakpoints.
justify-xlstringundefinedChanges the justify-content property on extra large and greater breakpoints.
no-guttersbooleanfalseRemoves the gutter between v-cols.
tagstring'div'Specify a custom tag used on the root element.

a-col

NameTypeDefaultDescription
align-selfstringundefinedApplies the align-items css property. Available options are start, center, end, auto, baseline and stretch.
colsboolean | string | numberfalseSets the default number of columns the component extends. Available options are 1 -> 12 and auto.
justify-selfstringundefined
lgboolean | string | numberfalseChanges the number of columns on large and greater breakpoints.
mdboolean | string | numberfalseChanges the number of columns on medium and greater breakpoints.
offsetstring | numberundefinedSets the default offset for the column.
offset-lgstring | numberundefinedChanges the offset of the component on large and greater breakpoints.
offset-mdstring | numberundefinedChanges the offset of the component on medium and greater breakpoints.
offset-smstring | numberundefinedChanges the offset of the component on small and greater breakpoints.
offset-xlstring | numberundefinedChanges the offset of the component on extra large and greater breakpoints.
orderstring | numberundefinedSets the default order for the column.
order-lgstring | numberundefinedChanges the order of the component on large and greater breakpoints.
order-mdstring | numberundefinedChanges the order of the component on medium and greater breakpoints.
order-smstring | numberundefinedChanges the order of the component on small and greater breakpoints.
order-xlstring | numberundefinedChanges the order of the component on extra large and greater breakpoints.
smboolean | string | numberfalseChanges the number of columns on small and greater breakpoints.
tagstring'div'Specify a custom tag used on the root element.
xlboolean | string | numberfalseChanges the number of columns on extra large and greater breakpoints.

a-spacer

No additional props.

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago