Reputation: 1
I am trying to place fontawesome icons onto my lwc component. Uploaded the zipped css file into the static resources and did referenced it in the lwc but no luck in getting this to work. Any suggestions?what is showing up instead of icon
Upvotes: 0
Views: 2080
Reputation: 180
Unzip the downloaded file from fontawesome portal, upload the below highlighted files to your salesforce instance as static resources from css folder
LWC JS:
import faCss from '@salesforce/resourceUrl/faCss';
import faCss1 from '@salesforce/resourceUrl/faCss1';
LWC HTML
<template>
<div>
<i class="fa fa-user"></i>
</div>
</template>
Upvotes: 1