Module: skia-elements/tabs-sk

tabs-sk

The tabs-sk custom element declaration, used in conjunction with button and the tabs-panel-sk element allows you to create tabbed interfaces. The association between the buttons and the tabs displayed in tabs-panel-sk is document order, i.e. the first button shows the first panel, second button shows second panel, etc.

Events
Name Description
tab-selected-sk Event sent when the user clicks on a tab. The events value of detail.index is the index of the selected tab.
Source:
Example
<tabs-sk>
  <button class=selected>Query</button>
  <button>Results</button>
</tabs-sk>
<tabs-panel-sk>
  <div>
    This is the query tab.
  </div>
  <div>
    This is the results tab.
  </div>
</tabs-panel-sk>

Methods

select(index, triggeropt)

Force the selection of a tab
Parameters:
Name Type Attributes Default Description
index number The index of the tab to select.
trigger boolean <optional>
false If true then trigger the 'tab-selected-sk' event.
Source: