There are three types of navbars: the default navbar, a secondary navbar, and a floating navbar. The default navbar and secondary navbar are both full-width and attached to the top of the page, with the secondary navbar meant to be placed below the default navbar. The floating navbar is not attached to the top of the page, can have content above it, and is only the width of the grid.
Navbars are placed inside of their own special container element, outside of the container
for the rest of the page. To designate a container for use with navbars, apply the class
navbarContainer
to the container element for both the default navbar. For
secondary navbars, add the class secondaryNavbarContainer
instead. Floating
navbars use the class floatingNavbarContainer
. For all types of navbar
containers, you must use the navbar container element, the regular container, and then rows
and columns.
When using both the default and secondary navbars, each should have a separate container. Columns and rows will work within navbars, but in general, no navbar container should have more than one row.
The default behavior for all navbars is to have a static position, meaning that when the
page is scrolled, the navbar will eventually disappear. However, any navbar can be made
persistent so that it will not disappear when scrolled. For the default and secondary
navbars, just add the class fixed
to the navbar container.
Floating navbars act a little differently, so instead of add the class fixed
,
add the class pin
to the container instead. Making floating navbars persistent
requires using the Pinned Elements plugin, so
make sure that the plugin is included on the page. When scrolled, a floating navbar will
automatically expand to the full-width of the page. A pinned floating navbar is used on the
ecommerce example page.
Including both a default and secondary navbar on a mobile screen will be overkill in most
cases, so it's recommended to hide the secondary navigation for mobile-sized screens using
the hideMobile
utility class. If the secondary menu items are still necessary,
considering hiding the secondary menu bar, but adding the items as a submenu beneath the
active menu item in the default menu by applying the class showMobile
to the
submenu. A demonstration of this can be found in the
article example page.
On mobile-sized screens, the floating navbar will appear full-width and will essentially act the same as the default navbar.
Variations of the navbar in action can be found in the examples section.
<div class="navbarContainer"> <div class="container"> <div class="row"> <div class="col12"></div> </div> </div> </div>
<div class="navbarContainer"> <div class="container"> <div class="row"> <div class="col12"></div> </div> </div> </div> <div class="secondaryNavbarContainer"> <div class="container"> <div class="row"> <div class="col12"></div> </div> </div> </div>
<div class="floatingNavbarContainer"> <div class="container"> <div class="row"> <div class="col12"></div> </div> </div> </div>
<div class="navbarContainer"> <div class="container"> <div class="row"> <div class="col12"> <ul class="mobileMenu"> <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a class="active" href="#">3</a> <ul class="showMobile"> <li><a href="#">3.1</a></li> <li><a href="#">3.2</a></li> <li><a class="active" href="#">3.3</a></li> </ul> </li> </ul> </div> </div> </div> </div> <div class="secondaryNavbarContainer hideMobile"> <div class="container"> <div class="row"> <div class="col12"></div> </div> </div> </div>
notice
infoNotice
successNotice
warningNotice
errorNotice
Note The correct semantic container for a notice is a
div
element. Multi-line notice bars should use an additional p
tag for
the text for proper spacing.
This is a multi-line info-based notice bar. It should extend over multiple lines. Other elements can be introduced to a notice bar such as a heading or an image.
Notices are for when your application or website has new information to share with the user. You can use the notices either as a single-line notification bar or as a larger block notification. There are five kinds of notices:
At times, you'll want to have special markers in the context of your text to draw attention to a
short but significant piece of information. Markers have the same use cases as notices, but instead
of using a notice
class prefix, use the class marker
instead.
When constructing markers, use the <span>
tag.
CSS Class | Example | Description |
---|---|---|
marker |
Generic | A generic marker. |
infoMarker |
Info | An info marker. |
successMarker |
Success | A success marker. |
warningMarker |
Warning | A warning marker. |
errorMarker |
Error | An error marker. |
Progress bars can be created by adding the class progressBar
to a
<span>
or <div>
element. Then, in a child element, add
the bar's width via the style
attribute, as shown below.
<span class="progressBar"> <span style="width: 33%;"></span> </span>
CSS Class | Example |
---|---|
progressBar |
|
infoProgressBar |
|
successProgressBar |
|
warningProgressBar |
|
errorProgressBar |
Breadcrumbs in VM UI Framework are simply lists with a class of breadcrumb
. Any links
in the breadcrumb will be followed by the breadcrumb separator.
<ul class="breadcrumb"> <li><a href="#">Link 1</a></li> <li><a href="#">Link 2</a></li> <li><a href="#">Link 3</a></li> <li>Current Item</li> </ul>
Pagination is handled with an unordered list of links with a class of pagination
.
If there is a current item in the pagination, the li
should be give the class of
active
.
<!-- Numbered Pagination --> <ul class="pagination"> <li class="active">1</li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> </ul> <!-- Full Pagination --> <ul class="pagination"> <li class="disabled">Latest</li> <li class="disabled">Newer</li> <li class="active">1</li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> <li><a href="#">Older</a></li> <li><a href="#">Oldest</a></li> </ul> <!-- Directional Pagination --> <ul class="pagination"> <li class="disabled">Newer Posts</li> <li class="right"><a href="#">Older Posts</a></li> </ul>
Responsive thumbnail galleries are simple to implement. Just create an unordered list and give it a
class of thumbs
. Each list element should receive a column class to give it a width:
col1
, col2
, etc. When a row's widths add up to the grid-width (12), the
next column li
should be given a class of firstCol
so that it will clear
the the previous row.
Note For mobile-sized devices, the thumbnails will automatically appear in rows of two.
<ul class="thumbs"> <li class="col2"><img src="images/gallery/rome-1-thumb.jpg"/></li> <li class="col2"><img src="images/gallery/rome-2-thumb.jpg"/></li> <li class="col2"><img src="images/gallery/rome-3-thumb.jpg"/></li> <li class="col2"><img src="images/gallery/rome-4-thumb.jpg"/></li> <li class="col2"><img src="images/gallery/rome-5-thumb.jpg"/></li> <li class="col2"><img src="images/gallery/rome-6-thumb.jpg"/></li> <li class="col2 firstCol"><img src="images/gallery/rome-7-thumb.jpg"/></li> <li class="col2"><img src="images/gallery/rome-8-thumb.jpg"/></li> <li class="col2"><img src="images/gallery/rome-9-thumb.jpg"/></li> <li class="col2"><img src="images/gallery/rome-10-thumb.jpg"/></li> <li class="col2"><img src="images/gallery/thailand-1-thumb.jpg"/></li> <li class="col2"><img src="images/gallery/thailand-2-thumb.jpg"/></li> <li class="col2 firstCol"><img src="images/gallery/thailand-3-thumb.jpg"/></li> <li class="col2"><img src="images/gallery/thailand-4-thumb.jpg"/></li> </ul>
Cards are formatted and styled information blocks that can be used for bios, status updates, comments, any kind of feed, a summary, or almost anything else. They can exist with any of the following elements: an image, a title, content, and a list of links.
It's possible to use an individual card or a list of cards. Lists of cards can be nested to form comment threads or similar interfaces.
To create an individual card, create a container with a class of card
.
Each card can contain either one or two containers, which can be given the classes
cardPic
and cardContent
. If you want to include a list of links
at the bottom of the card, just add a class of cardLinks
to the
ul
element.
A list of cards functions much the same way as individual cards, but each
li
acts as the card container, so you only need to add a
cardList
class to the ul
element. If you have a child list, it
should not be placed in either the cardPic
or the cardContent
containers. Instead, it should be placed after them, but within the li
element.
<div class="card"> <div class="cardPic"> <img src="images/examples/user3.jpg" alt=""/> </div> <div class="cardContent"> <h1>Luna</h1> <p>Why will you never let me outside? You know how much I love it out there and I hardly ever run away.</p> <ul class="cardLinks"> <li><a href="#">Profile</a></li> <li><a href="#">Website</a></li> <li><a href="#">Twitter</a></li> </ul> </div> </div>
When we get up in the morning, Luna and I like to do our best impression of a herd of elephants. We're stealthy like that.
<ul class="cardList"> <li> <div class="cardPic"> <img src="images/examples/user3.jpg" alt=""/> </div> <div class="cardContent"> <h1>Luna</h1> <p>Sometimes I will get hyper and do a 360° spin kick off the wall. I'm a crazy ninja cat and I <em>will</em> find you. I can open doors.</p> <ul class="cardLinks"> <li><a href="#">Profile</a></li> <li><a href="#">Website</a></li> <li><a href="#">Twitter</a></li> </ul> </div> </li> <li> <div class="cardPic"> <img src="images/examples/user5.jpg" alt=""/> </div> <div class="cardContent"> <h1>Kole</h1> <p>When we get up in the morning, Luna and I like to do our best impression of a herd of elephants. We're stealthy like that.</p> <ul class="cardLinks"> <li><a href="#">Profile</a></li> <li><a href="#">Website</a></li> <li><a href="#">Twitter</a></li> </ul> </div> <ul> <li> <div class="cardPic"> <img src="images/examples/user3.jpg" alt=""/> </div> <div class="cardContent"> <h1>Luna</h1> <p>Who are you calling an elephant?</p> <ul class="cardLinks"> <li><a href="#">Profile</a></li> <li><a href="#">Website</a></li> <li><a href="#">Twitter</a></li> </ul> </div> <ul> <li> <div class="cardPic"> <img src="images/examples/user5.jpg" alt=""/> </div> <div class="cardContent"> <h1>Kole</h1> <p>Well, you <em>do</em> keep stealing my food. Just sayin'...</p> <ul class="cardLinks"> <li><a href="#">Profile</a></li> <li><a href="#">Website</a></li> <li><a href="#">Twitter</a></li> </ul> </div> </li> </ul> </li> </ul> </li> </ul>
Unless specifically overridden, all images by default will proportionally expand or contract to 100% of the width of their container. In addition to that default functionality, you can add styling to your images by adding one or more of the following classes:
Image Style Classes | |
---|---|
Class | Description |
roundedImg |
Gives the image a rounded rectangle shape. |
circleImg |
Gives the image a circle shape. |
borderImg |
Adds a border to the image. |
borderOffsetImg |
Adds a border with padding to the image. |
You can hover over each image to see what classes have been applied.
VM UI Framework is created, owned, maintained by Virtuosi Media, Inc. © 2012-2013.