TabUI

This component creates a set of tabbed views that can be selected by the user.

Parameters

none

Attributes

  • .tab(title:string,view:ZUI,open?:()=>void) – this can be called repeatedly to add as many tab panes as desired. The title is the text that will be seen in the tab. The view is the component that will be shown when the tab is selected. The optional open parameter is a function that is called whenever this tab is selected.

Examples

new TabUI()
    .tab("Pig",a pig view)
    .tab("Dog",a dog view,()=>{ a dog was selected } )
    .tab("Cat",a cat view);

Styling

  • TabUI – default styling for the whole block
  • TabUI-bar – default styling for the tab bar
  • TabUI-btn – default styling for each of the tab buttons
  • TabUI-selected – default additional styling for the selected tab button. If a .style(“S”) attribute is defined then there is also a S-selected style for modifying the selected style of buttons.