function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sumesh ChandranSumesh Chandran 

Add a space and change the color of the Aura set attribute.

How do i add a space in between the sup.name & sup.count and also how do I change the font color of the sup.count part

<aura:set attribute="label">
   {!sup.name} <b style="color:red">({!sup.count})</b>
 </aura:set>

This simple doesn't work at all.

 
Raj VakatiRaj Vakati
Try like this 
 
<aura:set attribute="body">
<div>
   {!sup.name} <b style="color:red">({!sup.count})</b>
</div>
 </aura:set>

 
Sumesh ChandranSumesh Chandran
It doesn't work this is the way I am trying to do it, I want the tab to have sup.name and sup.count
<lightning:tabset onselect="{! c.tabSelect }" selectedTabId="{!v.selTabId}" variant="scoped">
            <aura:iteration items="{!v.supOpps}" var="sup">
                <lightning:tab id="{!sup.name}">
                    <aura:set attribute="label">
                        <div>
                            {!sup.name} <b style="color:red">({!sup.count})</b>
                        </div>                        
                    </aura:set>                
                </lightning:tab>
            </aura:iteration>
        </lightning:tabset>

 
Sumesh ChandranSumesh Chandran
I also want to put an icon to the left of the tab title and a badge with the count to the right of the tab title. I know that the below code worked for somebody, but its not working for me. Please advise!
 
<lightning:tabset onselect="{! c.tabSelect }" selectedTabId="{!v.selTabId}" variant="scoped">
        <aura:iteration items="{!v.supOpps}" var="sup">
            <lightning:tab id="{!sup.name}">
                <aura:set attribute="label">
                    <div class="slds-text-heading_small slds-text-title_caps">
                        <lightning:icon iconName="standard:people" size="small"/>
                        {!sup.name} <b class="tabCountColor" style="color:red">({!sup.count})</b>
			<span class="slds-badge_inverse">{!sup.count}</span>
                    </div>                        
                </aura:set>  
	</aura:iteration>
</lightning:tabset>