EMBL Grid Component

npm version

About

The EMBL Layout System is applied to the Container components. It is an asymmetrical grid of four columns. There are 3 layout options.

All EMBL Layouts are single column until the viewport is 768px or more. EMBL Layouts have two classes. One to define the grid area and where it is in the Page Grid another to determine what columns there are available.

Install

This component is distributed with npm. After installing npm, you can install the embl-grid with this command.

$ yarn add --dev @visual-framework/embl-grid

The source files included are written in Sass(scss). You can point your Sass include-path at your node_modules directory and import it like this.

@import "@visual-framework/embl-grid/index.scss";

Make sure you import Sass requirements along with the modules.

Usage

The CSS classnames available should be used on their own on a Container or added to a Containers existing classname declaration in the HTML.

A EMBL Layout should only be applied to Containers. For Blocks you should use the [Visual Framework Grid System]({{ '/docs/grids/grid-system' | path }}).

If the EMBL Layout System is being added to a Container that has a classname we separate the classes in the HTML with a |.


File system location: components/embl-grid

Variants


Variant: Default live embl-grid

Nunjucks demo

{% render '@embl-grid--default', {
  "component-type": "embl-grid"
} %}
        

Sample output

Sample output as HTML

<div class="vf-body">
  <div class="embl-grid">
    <div></div>
    <div></div>
  </div>
  <div class="embl-grid">
    <div></div>
    <div></div>
    <div></div>
  </div>
  <div class="embl-grid">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
  </div>
  <div class="embl-grid embl-grid--has-sidebar">
    <div></div>
    <div></div>
    <div></div>
  </div>
  <div class="embl-grid embl-grid--has-centered-content">
    <div></div>
    <div></div>
    <div></div>
  </div>
</div>

<style>
  .embl-grid>div {
    /* For illustrative use on component demo page */
    background-color: rgb(41, 141, 211);
    min-height: 5em;
    margin-bottom: 1em;
  }
</style>
        

Assets

All components in this design system

This page is part of the components section.