For information about tabs please refer to Bootstrap's documentation.
Tabs can be above, on right or on left of the content.
You can disable the extra positions in ace-features.scss by changing $tabs-left, etc to false:
<ul class="nav nav-tabs" role="tablist">
...
</ul>
<div class="tab-content">
...
</div>
To use other tabs positions such as .tabs-left, etc, you just need to change the parent class name:
<div class="tabs-left">
<ul class="nav nav-tabs" role="tablist">
...
</ul>
<div class="tab-content">
...
</div>
</div>
Add .nav-tabs-simple for simple style tabs and you can use custom border color for .active item:
<ul class="nav nav-tabs nav-tabs-simple">
<li class="nav-item">
<a href="#" class="nav-link brc-danger" ...>
...
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link brc-success" ...>
...
</a>
</li>
</ul>
You can also use Dynamic Styling to show/hide an icon or text when a tab button becomes .active or inactive:
<li class="nav-item">
<a href="#" class="nav-link brc-success d-style" ...>
<i class="fa fa-home text-grey-l2 d-n-active"></i>
<i class="fa fa-home text-success-m1 d-active"></i>
Home
</a>
</li>
You can use .btn classes instead of .nav-link for custom tab buttons:

<ul class="nav nav-tabs bgc-secondary-l2 border-y-1 brc-secondary-l2" role="tablist">
<li class="nav-item mr-2px">
<a id="home1-tab-btn"
class="d-style active btn btn-tp btn-light-secondary btn-h-white btn-a-text-dark btn-a-white px-3 px-sm-4 py-25 radius-0 border-0"
data-toggle="tab" href="#tab1" role="tab" aria-controls="home1" aria-selected="true">
<span class="v-active position-tl w-100 border-t-3 brc-green mt-n3px"></span><!-- when .active show a green border on top -->
Home
</a>
</li>
.
.
.
</ul>
Enable sliding tab panes by adding .tab-sliding to the .tab-content.
.tab-pane elements shouldn't have .fade any more:
<div class="tab-content tab-sliding px-0">
<div class="tab-pane active show px-2" id="tab-1">
...
</div>
<div class="tab-pane px-2" id="tab-2">
...
</div>
</div>
.mh-none (max-height: none) class to .tab-pane , the .tab-content instantly becomes as tall as the newly active tab
data-swipe: If set tonone, swiping will be disabled. If set torightorleftonly swiping right/left will be allowed
<div class="tab-content tab-sliding px-0" data-swipe="none">
...
</div>
data-swipe-prevanddata-swipe-next: Can be used to specify the previous or next tab pane when swiping a tab pane:
<div class="tab-pane px-2" id="tab-4" data-swipe-prev="#tab-1">
<!-- swiping #tab-4 to right will show #tab-1 instead of #tab-3 -->
</div>
When inside signup and forgot you can only swipe back to login.
If you add a set of tabs later and want to enable swiping for them, you can use the
aceTabSwipe function:
$('#my-tab-content.tab-content').aceTabSwipe()

In small devices, tab buttons may not fit in available space. They can either be wrapped or made scrollable by using the following options:
When a tab button is clicked, .nav element is scrolled for that button to come into center:
<ul class="nav nav-tabs nav-justified nav-tabs-scroll">
...
</ul>
This will make the tabs scrollable. You can swipe the buttons right or left:
<ul class="nav nav-tabs nav-justified nav-tabs-scroll is-scrollable">
...
</ul>
Add .is-scrollbar-shown to make scrollbars visible.
If you add a set of tabs later and want to enable scrolling for them, you can use the
aceTabScroll function:
$('#my-scrollable-nav-tabs').aceTabScroll()
.sticky-nav elements stick to page's top or below navbar (if navbar is fixed):
<div class="sticky-nav">
<ul class="nav nav-tabs page-nav-tabs nav-tabs-boxed nav-justified nav-tabs-scroll is-scrollable" role="tablist">
...
</ul>
</div>
<div class="tab-content">
...
</div>
position: sticky, its parents should be overflow: visible .Therefore in Ace's demo in pages that have
.sticky-nav, I disable overflow: hidden for .body-container dynamically but you should do that in CSS,
if you have a sticky element on all of your pages:
$('.body-container').css('overflow', 'visible') // for sticky to work
Also when sidebar is .sidebar-push , .main-content has overflow-x: hidden and you can't have sticky nav
overflow: hidden from .body-container, sometimes causes unwanted horizontal scrollbars for body if an element is wider than window size.Make sure to check for that and modify/re-structure your elements to fit in window area properly
For that, you can listen to the custom
sticky-change event:
var stickyNav = document.querySelector('.sticky-nav');
stickyNav.addEventListener('sticky-change', function(e) {
stickyNav.classList.toggle('is-stuck', e.detail.isSticky)
// var myNav = stickyNav.querySelector('.nav-tabs')
if (e.detail.isSticky) {
// if stuck do something
// myNav.classList.add('bgc-white-tp1');
}
else {
// if not stuck undo the thing
// myNav.classList.remove('bgc-white-tp1');
}
})
See views/pages/page-profile/@page-script.js for more of an example
If you add a set of tabs (or other element) later and want to enable sticky events for them, you can use the
aceStickyNav function:
$('#my-sticky-nav').aceStickyNav()
You can have sticky navs for smaller devices only:
.sticky-nav-smwill become sticky only belowsmsize.sticky-nav-mdwill become sticky only belowmdsize.sticky-nav-lgwill become sticky only belowlgsize.sticky-nav-xlwill become sticky only belowxlsize
<div class="sticky-nav-md">
<!-- becomes sticky only below md size -->
</div>
Remember for sticky to work, .body-container cannot have overflow: hidden
var stickyNav = document.querySelector('[class*="sticky-nav"]');
stickyNav.addEventListener('sticky-change', function(e) {
if (e.detail.isSticky) {
// if stuck do something
}
else {
// if not sticky undo the thing
}
})
thead) as well.