TabStrip

Description

The TabStrip widget displays tabs that display associated content when selected.

Official Kendo UI TabStrip documentation

Examples

  • Basic Example
  • Passing additional options
  • Using global options

This example demonstrates initializing a TabStrip widget with no additional options specified.

<div data-bind="kendoTabStrip: {}">
    <ul>
        <li class="k-state-active">tab one</li>
        <li>tab two</li>
        <li>tab three</li>
    </ul>
    <div>tab one content</div>
    <div>tab two content</div>
    <div>tab three content</div>
</div>
var ViewModel = function() {};

                            ko.applyBindings(new ViewModel());
  • tab one
  • tab two
  • tab three
tab one content
tab two content
tab three content

This example demonstrates passing additional options in the data-bind attribute. The kendoTab binding can be applied to child elements to control the behavior of individual menu items.

<input type="checkbox" data-bind="checked: oneEnabled" /> Enabled 1<br/>
<input type="checkbox" data-bind="checked: twoEnabled" /> Enabled 2
<hr/>
<div data-bind="kendoTabStrip: {}">
    <ul>
        <li data-bind="kendoTab: { enabled: oneEnabled }" class="k-state-active">tab one</li>
        <li data-bind="kendoTab: { enabled: twoEnabled }">tab two</li>
        <li>tab three</li>
    </ul>
    <div>tab one content</div>
    <div>tab two content</div>
    <div>tab three content</div>
</div>
var ViewModel = function() {
    this.oneEnabled = ko.observable(false);
    this.twoEnabled = ko.observable(true);
};

                            ko.applyBindings(new ViewModel());
Enabled 1
Enabled 2
  • tab one
  • tab two
  • tab three
tab one content
tab two content
tab three content

This example demonstrates setting global options in ko.bindingHandlers.kendoTabStrip.options. This helps to simplify the markup for settings that can be used as a default for all instances of this widget.

<div data-bind="kendoTabStrip: {}">
    <ul>
        <li>tab one</li>
        <li class="k-state-active">tab two</li>
        <li>tab three</li>
    </ul>
    <div>tab one content</div>
    <div>tab two content</div>
    <div>tab three content</div>
</div>
var ViewModel = function() {};

ko.bindingHandlers.kendoTabStrip.options.animation = false;

                            ko.applyBindings(new ViewModel());
  • tab one
  • tab two
  • tab three
tab one content
tab two content
tab three content

Live Options

The kendoTabStrip.md binding accepts all of the options that can be specified for the widget. However, when bound against an observable, these live options will update the widget or respond to updates from interactions with the widget.
enabled

Determines if users can interact with the tab

widget

If specified, will populate an observable with a reference to the actual widget

Future Plans

Better support for selecting/deselecting tabs and data source integration.