Heading Component

npm version

About

Install

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

$ yarn add --dev @visual-framework/vf-heading

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/vf-heading/index.scss";

Make sure you import Sass requirements along with the modules.


File system location: components/vf-heading

Variants


Variant: Default live element

Nunjucks demo

{% render '@vf-heading--default', {
  "component-type": "element"
} %}
        

Sample output

Sample output as HTML

 <p class="vf-text"></p>
        

Assets


Variant: Display live element

Nunjucks demo

{% render '@vf-heading--display', {
  "component-type": "element",
  "type": 1,
  "heading": "This heading size is extra large and inverted",
  "style": "invert",
  "tags": "h1"
} %}
        

Sample output

This heading size is extra large and inverted

Sample output as HTML

 <h1 class="vf-text vf-text-heading--1 vf-text--invert">This heading size is extra large and inverted</h1>
        

Assets


Variant: Extra Large live element

Nunjucks demo

{% render '@vf-heading--extra-large', {
  "component-type": "element",
  "type": 2,
  "heading": "This heading size is extra large",
  "tags": "h1"
} %}
        

Sample output

This heading size is extra large

Sample output as HTML

 <h1 class="vf-text vf-text-heading--2">This heading size is extra large</h1>
        

Assets


Variant: Large live element

Nunjucks demo

{% render '@vf-heading--large', {
  "component-type": "element",
  "type": 3,
  "heading": "This heading size is large",
  "tags": "h2"
} %}
        

Sample output

This heading size is large

Sample output as HTML

 <h2 class="vf-text vf-text-heading--3">This heading size is large</h2>
        

Assets


Variant: Regular live element

Nunjucks demo

{% render '@vf-heading--regular', {
  "component-type": "element",
  "type": 4,
  "heading": "This heading size is regular",
  "tags": "h3"
} %}
        

Sample output

This heading size is regular

Sample output as HTML

 <h3 class="vf-text vf-text-heading--4">This heading size is regular</h3>
        

Assets


Variant: Small live element

Nunjucks demo

{% render '@vf-heading--small', {
  "component-type": "element",
  "type": 5,
  "heading": "This heading size is small",
  "tags": "h4"
} %}
        

Sample output

This heading size is small

Sample output as HTML

 <h4 class="vf-text vf-text-heading--5">This heading size is small</h4>
        

Assets

All components in this design system

This page is part of the components section.