new PfTabs()
Example
<pf-tabs> <pf-tab tab-title="Tab1" active="true"> <p>Tab1 content here</p> </pf-tab> <pf-tab tab-title="Tab2"> <p>Tab2 content here</p> </pf-tab> </pf-tabs>
Methods
-
attributeChangedCallback(attrName, oldValue, newValue)
-
Called when element's attribute value has changed
Parameters:
Name Type Description attrNamestring The attribute name that has changed
oldValuestring The old attribute value
newValuestring The new attribute value
-
disconnectedCallback()
-
Called when the element is removed from the DOM
-
handleEvent(event)
-
Handle the tab change event
Parameters:
Name Type Description eventEvent Handle the tab change event
-
handleTitle(panel, tabTitle)
-
Handle the tabTitle change event
Parameters:
Name Type Description panelstring The tab panel
tabTitlestring The tab title
-
setActiveTab(tabTitle)
-
Sets the active tab programmatically
Parameters:
Name Type Description tabTitle