austinsand:roba-tabs

Basic Blaze templates for effortless Bootstrap tabs with FlowRouter integration


License
GPL-3.0
Install
meteor add austinsand:roba-tabs@=1.0.0

Documentation

austinsand:roba-tabs

Basic Blaze templates for effortless Bootstrap tabs. FlowRouter integration is also present to provide navigation to tabs including tabs groups within other tabs.

meteor add austinand:roba-tabs

Usage

There are two blaze templates which work in tandem for RobaTabs:

{{#RobaTabGroup name="sub-tabs" navClass="nav-tabs"}}
    {{#RobaTab name="dialog" title="Dialog"}}
        <h2>Dialog Tests</h2>
        <div>
            This tab has dialog tests on it
        </div>
    {{/RobaTab}}
    {{#RobaTab name="popover" title="Popover"}}
        <h2>Popover Tests</h2>
        <div>
            This tab has popover tests on it
        </div>
    {{/RobaTab}}
{{/RobaTabGroup}}

API

RobaTabGroup

This template groups sibling tabs together and controls what type of Nav element the tabs display as. The following parameters can be passed:

name (String) required

  • The name of the tab group, stored as data-tab-group on the tab-group element
  • This is required for FlowRouter integration
  • Default: null

navClass (String) optional

  • The name of the tab group, stored as data-tab-group on the tab-group element
  • Default: nav-pills

RobaTab

This template contains the tab content and takes a few parameters about the tab:

name (String) required

  • The name of the tab, stored as data-tab-name on the tabelement
  • This can be used to programatically set tabs
  • This is required
  • Default: null

title (String) required

  • The displayed title of the tab
  • Default: null