How can I set background color for selected tab in lightning:tabset

    <lightning:tab label="Item One">
        Sample Content One
    <lightning:tab label="Item Two">
        Sample Content Two

Thanks in advance.

  • The Tab or the tab detail?
    – Eric
    Commented Feb 21, 2017 at 2:41
  • tab itself not the detail.
    – sfdcdev
    Commented Feb 21, 2017 at 2:51

3 Answers 3


You can use the following CSS in your component

.THIS slds-tabs--default__nav li.slds-active{
     background: red;

Adjust as needed


Try Add this following In css

.THIS .slds-tabs--default__item.slds-active{
     background: blue;

Adding the CSS below worked for me:

.THIS .slds-tabs_default__item.slds-is-active {
    background: greenyellow !important;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .