Tab
lightning:tab
A single tab that is nested in a lightning:tabset component.
For Aura components only. For LWC development, use lightning-tab.
For Use In
Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out (Beta), Standalone Lightning App, Mobile Offline
A lightning:tab component keeps related content in a single container. The tab content displays when a user clicks the tab. Use lightning:tab as a child of the lightning:tabset component.
This component implements styling from tabs in the Lightning Design System.
Use the label attribute to specify the tab's text label.
To include an icon at the beginning of the label, use the iconName attribute. Provide alternative text for the icon using the iconAssistiveText attribute.
To include an icon at the end of the label, use the endIconName attribute. Provide alternative text for that icon using the endIconAlternativeText attribute.
Set showErrorIndicator to true to display an error indicator in the tab after the label. If an end icon is present, the error indicator is displayed after the icon.
Tab content is lazy loaded. You can only query the content for the active and previously active tabs. See lightning:tabset for more information.
You can nest lightning:tab within aura:if or aura:iteration. Otherwise, you must nest lightning:tab directly within lightning:tabset.
For example, you want to display a tab conditionally.