0

trying to change the color of an utility icon on a lightning tab but adding a variant does not work. What are the possible ways to change the color of the lightning tab icon?

<lightning-tab label='{label}' value={value} end-icon-name='utility:icon' variant='Error'></lightning-tab>
1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Jun 9, 2022 at 18:02

1 Answer 1

0

You can use either Styling Hooks or Design Token to change the Tab Icon Color as below.

Styling Hooks

.blue-icon{
    --slds-c-icon-color-foreground-default:red;
}

Design Token

.blue-icon{
    --lwc-colorTextIconDefault:blue;
}

HTML

<template>   
    <lightning-card>
        <lightning-tabset class="blue-icon">
            <lightning-tab end-icon-name="utility:button_choice" label="Item One"> 
                Content for tab 1 
            </lightning-tab>
        </lightning-tabset>
    </lightning-card>
</template>
2

You must log in to answer this question.

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