Components
Reusable components to built the user interface.
Reusable components to built the user interface.
Navmenu is a vertical navigation component. By default it shares it look and feel with the navmenu component.
The navmenu is 300px wide by default. You can change this by customizing the @navmenu-width
variable or by setting the width of .navmenu
in your CSS.
<nav class="navmenu navmenu-default" role="navigation">
<a class="navmenu-brand" href="#">Brand</a>
<ul class="nav navmenu-nav">
<li class="active"><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu navmenu-nav" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
</nav>
Be sure to add a role="navigation"
to every navmenu to help with accessibility.
Add either .navmenu-fixed-left
or .navmenu-fixed-right
.
<nav class="navmenu navmenu-default navmenu-fixed-left offcanvas-sm" role="navigation">
...
</nav>
The fixed navmenu will overlay your other content, unless you add padding
to the left or right of the <body>
. Try out your own values or use our snippet below. Tip: By default, the navmenu is 300px wide.
@media (min-width: 992px) {
body {
padding-left: 300px;
}
}
Make sure to include this after the Jasny Bootstrap CSS.
With the offcanvas plugin, you can hide the navmenu off canvas. This is especially useful for screens with a small viewport.
<nav id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-left offcanvas" role="navigation">
...
</nav>
<div class="navbar navbar-default navbar-fixed-top">
<button type="button" class="navbar-toggle" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
There is a full example for an off canvas push menu as well as examples for an off canvas navmenu with an slide in and reveal effect.
Modify the look of the navmenu by adding .navmenu-inverse
.
<nav class="navmenu navmenu-inverse" role="navigation">
...
</nav>
Add .alert-fixed-top
top stick the alert on top of your page. Use .alert-fixed-bottom
for the bottom.
<div class="alert alert-success alert-fixed-top">
<strong>Success!</strong> Your action has been completed succefully.
</div>