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 attrName
string The attribute name that has changed
oldValue
string The old attribute value
newValue
string 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 event
Event Handle the tab change event
-
handleTitle(panel, tabTitle)
-
Handle the tabTitle change event
Parameters:
Name Type Description panel
string The tab panel
tabTitle
string The tab title
-
setActiveTab(tabTitle)
-
Sets the active tab programmatically
Parameters:
Name Type Description tabTitle