[SalesForce] lightning:Tabset and Tab -Graying out Tabs based off a condition

I am using lightning:tabSet and lightning:tab to display 3 user forms shown in the 3 tabs.

I would like the user to fill out the form on the first tab before he clicks on other tabs. How should I gray out other tabs until the first tab is clicked.

I can use "v.selectedTabId" to set a tab but without graying out this might confuse the user. I would like to gray out a tab to clearly indicate that it cannot be clickable.

Any ideas?

Best Answer

You can't do this with lightning:tab, because there is no attribute that supports this, and even the Lightning Design System has no provision for disabled tabs. Instead, you might want to dynamically create the tabs as the user progresses, so they have the ability to go back and forth as they continue filling out the data.

Related Topic