1

I have a lightning-icon element:

<lightning-icon icon-name="utility:asset_repossessed"></lightning-icon>

"asset_repossessed" is the only icon that doesn't show, what gives ?

enter image description here

Any other icon I try works just fine...

<lightning-icon icon-name="utility:asset_warranty"></lightning-icon>

enter image description here

If you want the surrounding context here it is but I don't think that matters:

 <lightning-card>
        <template lwc:if={accountInfo.data}>
            <div class="slds-grid slds-wrap slds-gutters slds-m-around_large">
                <div class="slds-col  slds-size_2-of-8">
                    <template lwc:if={usingMaster}>
                        <lightning-icon icon-name="utility:opportunity"></lightning-icon>
                    </template>
                    <lightning-icon icon-name="utility:asset_warranty"></lightning-icon>
                </div>
                 ...

Every other icon I try works:

<lightning-icon icon-name="utility:arrowdown"></lightning-icon>

1 Answer 1

2

asset_repossessed is introduced in Spring '24 release of SLDS. Hence to get this working your org needs to be on the latest Spring '24 release.

You can sign up for a Spring 24 release org from here.

The other alternative is to manually download the icon SVG from the SLDS site and put this in the static resource and then use it as below

import { LightningElement } from 'lwc'; 
import customIcon from '@salesforce/resourceUrl/asset_repossessed'; 

export default class CustomIconLWC extends LightningElement { 
   customIcon = customIcon + '#asset_repossessed';
} 

HTML Template

<template>
    <div>customIcon</div>
    <lightning-icon src={customIcon}></lightning-icon>
</template>
4
  • Are icons mentioned in the release notes ? If so where ? If not how did you know about this ?
    – MadMax
    Jan 16 at 4:22
  • 2
    You can check the SLDS site and see that prior versions did not have them. Jan 16 at 7:46
  • 2
    Also since I work for Salesforce it makes it easy for me to look at internal codebase and know this. Jan 16 at 7:46
  • 1
    Always nice to have a cheat code. If I ever get a chance, I might have to apply :D
    – sfdcfox
    Jan 17 at 3:13

You must log in to answer this question.

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