Tabbar can take the following modifications:
Related sample: Dynamic Tabbar in Multiview
Everything is done fully automatically: when the size of a window changes, tabs are minimized and then pushed to a popup. So the following code is enough:
Default tabbar
{ view:"tabbar", options:["First tab", "Second Tab"] }
Tabbar
Popup
The width of the popup is 200px by default. It contains 7 items and displays them via the "#value#" template. You can change it by the tabbarPopup property that can include:
Customized tabbar
webix.ui({
view:"tabbar",
options: [
{id:1, value:"First Tab", text:"Some text for first tab"},
{id:2, value:"Second Tab", text:"Some text for second tab"},
// other options
],
moreTemplate:"Show more",
tabbarPopup:{
// custom styles for popup
css:"more_popup",
body:{
yCount:10,
template: obj => `
<span webix_tooltip="${obj.value}" class="content">
Hidden: ${obj.value}
</span>`,
tooltip:{
template:"",
overflow: true
}
}
}
});
Related sample: Tabbar: Custom Popup
More info about Webix data templates can be found in the dedicated documentation article.
Back to top