Examples

Add quick, dynamic tab functionality to transition through panes of local content.

Live demo clog.info

$scope.tabs = {{tabs | json}};
{{tabs.activeTab}} 

Usage

Append a bs-tabsattribute to any element to enable the directive.

Custom animations

Pane animation is done with ngClass('active') callbacks and require custom CSS.

      
        .tabs.animation-fade .tab-pane {
          opacity: 1;
          transition: opacity .3s ease;
          min-height:60px;
          &.active-add {
            display: block;
            opacity: 0;
            &.active-add-active {
              opacity: 1;
            }
          }
          &.active-remove {
            display: none;
          }
        }
      
    

Options

Options can be passed via data attributes or as an AngularJS expression to evaluate as an object on bs-tabs. For data attributes, append the option name to data-, as in data-animation="".

Name type default description
animation string animation-fade apply a CSS animation to the popover with ngAnimate
template path false

If a remote URL is provided, overrides the default template

Default options

You can override global defaults for the plugin with $tabProvider.defaults

        
          angular.module('myApp')
          .config(function($tabProvider) {
            angular.extend($tabProvider.defaults, {
              animation: 'animation-flipX'
            });
          })