List Component

npm version

About

Classic html list <li> types: order, unordered, bulleted and inline.

Install

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

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

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

Make sure you import Sass requirements along with the modules.


File system location: components/vf-list

Variants


Variant: Default live element

Nunjucks demo

{% render '@vf-list--default', {
  "component-type": "element",
  "list": [
    "a list item",
    "another list item",
    "and another list item",
    "yet another list item"
  ]
} %}
        

Sample output

Sample output as HTML

<ul class="vf-list">
  <li class="vf-list__item">a list item</li>
  <li class="vf-list__item">another list item</li>
  <li class="vf-list__item">and another list item</li>
  <li class="vf-list__item">yet another list item</li>
</ul>
        

Assets


Variant: Inline live element

Nunjucks demo

{% render '@vf-list--inline', {
  "component-type": "element",
  "list_type": "inline",
  "list": [
    "a list item",
    "another list item",
    "and another list item",
    "yet another list item"
  ]
} %}
        

Sample output

Sample output as HTML

<ul class="vf-list vf-list--inline">
  <li class="vf-list__item">a list item</li>
  <li class="vf-list__item">another list item</li>
  <li class="vf-list__item">and another list item</li>
  <li class="vf-list__item">yet another list item</li>
</ul>
        

Assets


Variant: Ordered live element

Nunjucks demo

{% render '@vf-list--ordered', {
  "component-type": "element",
  "list_type": "ordered",
  "list": [
    "a list item",
    "another list item",
    "and another list item",
    "yet another list item"
  ]
} %}
        

Sample output

Sample output as HTML

<ul class="vf-list vf-list--ordered">
  <li class="vf-list__item">a list item</li>
  <li class="vf-list__item">another list item</li>
  <li class="vf-list__item">and another list item</li>
  <li class="vf-list__item">yet another list item</li>
</ul>
        

Assets


Variant: Unordered live element

Nunjucks demo

{% render '@vf-list--unordered', {
  "component-type": "element",
  "list_type": "unordered",
  "list": [
    "a list item",
    "another list item",
    "and another list item",
    "yet another list item"
  ]
} %}
        

Sample output

Sample output as HTML

<ul class="vf-list vf-list--unordered">
  <li class="vf-list__item">a list item</li>
  <li class="vf-list__item">another list item</li>
  <li class="vf-list__item">and another list item</li>
  <li class="vf-list__item">yet another list item</li>
</ul>
        

Assets

All components in this design system

This page is part of the components section.