Apps Menu

Standalone UI Components

This is a complete list of standalone (non-Bootstrap) UI components.

vws-c-content

Defines the main content area.

Elements:

Example:

<div class="vws-c-content">
    <h2 class="vws-c-content__heading">Welcome Gavin Mellor</h2></div>

vws-c-dashboard-grid

Defines the grid used to position dashboard elements.

Elements:

Variations:

Example:

<div class="vws-c-dashboard-grid">
    <section class="vws-c-dashboard-grid__item"></section>
</div>

vws-c-dashboard-module

Defines an individual dashboard module.

Elements:

Example:

<section class="vws-c-dashboard-module">
    <header class="vws-c-dashboard-module__header">
        <h1 class="vws-c-dashboard-module__heading"></h1>
        <p class="vws-c-dashboard-module__sub-heading"></p>
    </header>
    <div class="vws-c-dashboard-module__body"></div>
</section>

vws-c-main-stage

Defines the area that slides to cover the sidebar.

This component is affected by the parent class, vws-has-expanded-sidebar — see notes about the Collapsing Sidebar below.

Example:

<div class="vws-c-main-stage"></div>

vws-c-side-nav

Defines the left-hand navigation menu.

Elements:

Modifiers:

Variations:

Add any of the Gizmo icons to a nav item with ss-[icon name]:

Add any of the custom Views UI icons to a nav item with vws-i-[icon name]:

Nav items can have an active state:

Example:

<ul class="vws-c-side-nav">
    <li><a class="vws-c-side-nav__link ss-desktop vws-is-active" href="">Dashboard</a>
        <ul class="vws-c-side-nav__sub-nav">
                <li><a class="vws-c-side-nav__link vws-c-side-nav__link--sub-link" href="">Sub Item 1</a></li>
                <li><a class="vws-c-side-nav__link vws-c-side-nav__link--sub-link vws-is-active" href="">Sub Item 2</a></li>
            </ul>
        </li>
    </li>
    <li><a class="vws-c-side-nav__link ss-piechart" href="">Statistics</a></li>
    <li><a class="vws-c-side-nav__link ss-barchart" href="">Statistics Summary</a></li>
    <li><a class="vws-c-side-nav__link ss-picture" href="">Reports</a></li>
</ul>

vws-c-side-panel

Defines the fixed left-hand side panel area.

Elements:

Notes:

Example:

<header class="vws-c-side-panel"><div class="vws-c-side-panel__toggle">Open/Close Menu</div>
</header>

vws-c-top-bar

Defines the static bar at the top of the screen.

Example:

<div class="vws-c-top-bar"></div>

vws-c-user-nav

Defines a link to user-specific options. This might link to a profile or settings page, or could become a drop-down/popup menu at a later date.

Elements:

Example:

<div class="vws-c-user-nav">
    <a class="vws-c-user-nav__link" href="">Gavin Mellor</a>
</div>

vws-c-apps-nav

Defines navigation in the top bar for Views apps.

Elements:

Variations:

Each of the four main Views apps has a specific style using a custom icon:

Nav items can have an active state:

Dropdown sub-navigation:

Notes:

Example:

<a href="#" class="vws-apps-hamburger js-hamburger-toggle">Apps Menu</a>
<nav class="vws-c-apps-nav js-hamburger-nav">
    <ul>
        <li>
            <a class="vws-c-apps-nav__link vws-c-apps-nav__link--contacts" href="">Contacts</a>
            <ul>
                <li><a class="vws-c-apps-nav__link" href="">Sub Nav Item 1</a></li>
                <li><a class="vws-c-apps-nav__link" href="">Sub Nav Item 2</a></li>
                <li><a class="vws-c-apps-nav__link" href="">Sub Nav Item 3</a></li>
                <li><a class="vws-c-apps-nav__link" href="">Sub Nav Item 4</a></li>
            </ul>
        </li></ul>
</nav>

vws-c-views-logo

Defines the main Views logo and title that sits at the top-left of the screen.

Elements:

Notes:

Example:

<a class="vws-c-views-logo" href="">
    <span class="vws-c-views-logo__img">
        <img src="/img/views-logo.svg">
    </span>
</a>

vws-c-breadcrumbs

Defines a list of breadcrumbs. See Breadrumbs docs.

vws-c-pie-chart

Defines a pie chart with a legend.

Elements:

Example:

<div class="vws-c-pie-chart">
    <div class="vws-c-pie-chart__legend">
        <h3 class="vws-c-pie-chart__legend-title">First Name</h3>
        <ul class="vws-c-pie-chart__legend-items">
            <li class="vws-c-pie-chart__legend-item">
                <span class="vws-c-pie-chart__legend-item-color" style="background-color: #fc5a5d"></span>
                Marisa
            </li></ul>
    </div>
    <div class="vws-c-pie-chart__pie-container">
        <div class="vws-c-pie-chart__pie">
            <canvas id="example-js-pie-chart"></canvas>
        </div>
    </div>
</div>

vws-c-action-btn

Defines a button style for UI action buttons.

Modifiers:

Example:

<a class="vws-c-ui-header__ui vws-c-action-btn vws-c-action-btn--download">Export</a>

vws-c-ui-header

Layout component that defines layout for the content header with title and, optionally, UI components.

Elements:

Example:

<div class="vws-c-ui-header">
    <h2 class="vws-c-ui-header__heading vws-c-content__heading">Statistics</h2>
    <a class="vws-c-ui-header__ui vws-c-action-btn vws-c-action-btn--download">Export</a>
</div>

vws-c-data-table

Defines a data table.

Note: for tables to scroll horizontally on small screens, the block (vws-c-data-table) must be applied to the HTML table element’s parent element, and vws-c-data-table__table applied to the HTML table element. See the example below.

Elements:

Example:

<div class="vws-c-data-table">
    <table class="vws-c-data-table__table">
        <thead>
            <tr class="vws-c-data-table__header">
                <th class="vws-c-data-table__header-item">First Name</th>
                <th class="vws-c-data-table__header-item">Last Name</th>
                <th class="vws-c-data-table__header-item">Column Title</th>
                <th class="vws-c-data-table__header-item">Column Title</th>
                <th class="vws-c-data-table__header-item">Column Title</th>
                <th class="vws-c-data-table__header-item">Column Title</th>
            </tr>
        </thead>
        <tbody>
            <tr class="vws-c-data-table__row">
                <td class="vws-c-data-table__item">Marisa</td>
                <td class="vws-c-data-table__item">Smith</td>
                <td class="vws-c-data-table__item">Field Entry</td>
                <td class="vws-c-data-table__item">Field Entry</td>
                <td class="vws-c-data-table__item">Field Entry</td>
                <td class="vws-c-data-table__item">Field Entry</td>
            </tr>
        </tbody>
    </table>
</div>

Collapsing Sidebar

The sidebar state defaults to its collapsed state. To expand it add the vws-has-expanded-sidebar class to an element which is the parent of both vws-c-main-stage and vws-c-side-panel. For example:

<body class="vws-has-expanded-sidebar"><header class="vws-c-side-panel"></header>
    <div class="vws-c-main-stage"></div></header>

Apps/Sections Themes

The sidebar colour and active apps-nav link should demonstrate to the user which of the main Views apps/sections they’re currently looking at. This theming is applied by adding a class to the HTML body tag:

<body class="vws-is-contacts">

Available classes:

.vws-is-contacts
.vws-is-work
.vws-is-evidence
.vws-is-reporting
.vws-is-admin