Anchor Design System

Grid column3.0

The grid-column component is a non-visual layout component that can be used to create a grid layout. It works as a child component of the grid-row component.

Installation

npm i @tryg/ui-library

Usage

Individual only imports the desired component, and only needs to be included once within the application. Which is beneficial to keep the application size small.

Webcomponent
<script type="module">
  import { defineCustomElement as defineCustomContainerElement } from '@tryg/ui-library/dist/components/anchor-container';
  import { defineCustomElement as defineCustomRowElement } from '@tryg/ui-library/dist/components/anchor-grid-row';
  import { defineCustomElement as defineCustomColumnElement } from '@tryg/ui-library/dist/components/anchor-grid-column';
  defineCustomContainerElement();
  defineCustomRowElement();
  defineCustomColumnElement();
</script>
<anchor-container>
  <anchor-grid-row>
    <anchor-grid-column column="1">
      1
    </anchor-grid-column>
    <anchor-grid-column column="1">
      2
    </anchor-grid-column>
    <anchor-grid-column column="1">
      3
    </anchor-grid-column>
    <anchor-grid-column column="1">
      4
    </anchor-grid-column>
  </anchor-grid-row>
</anchor-container>

Global only needs to be defined once in the application, but it will import all components even the ones that are not in use..

Webcomponent
<script type="module">
  import { defineCustomElements } from '@tryg/ui-library/dist/loader';
  defineCustomElements();
</script>
<anchor-container>
  <anchor-grid-row>
    <anchor-grid-column column="1">
      1
    </anchor-grid-column>
    <anchor-grid-column column="1">
      2
    </anchor-grid-column>
    <anchor-grid-column column="1">
      3
    </anchor-grid-column>
    <anchor-grid-column column="1">
      4
    </anchor-grid-column>
  </anchor-grid-row>
</anchor-container>

API

anchor-grid-column

Properties

PropertyAttributeDescriptionTypeDefault
columncolumnSet the number of columns the grid-column should span in the default screen size (mobile).1 | 2 | 3 | 4undefined
lgColumnlg-columnSet the number of columns the grid-column should span in the large screen size.1 | 10 | 11 | 12 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9undefined
mdColumnmd-columnSet the number of columns the grid-column should span in the medium screen size.1 | 10 | 11 | 12 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9undefined
smColumnsm-columnSet the number of columns the grid-column should span in the small screen size.1 | 2 | 3 | 4 | 5 | 6 | 7 | 8undefined
xlColumnxl-columnSet the number of columns the grid-column should span in the extra large screen size.1 | 10 | 11 | 12 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9undefined

Built with StencilJS

On this page