Apply CSS to lightning combobox in LWC in Salesforce

Apply CSS to lightning combobox in LWC in Salesforce

Use style to apply CSS to lightning-combobox. Check the below code for example.
 
Sample Code:
<template>
<div class=”slds-box slds-theme–default”>
<lightning-combobox name=”filter”
label=”Status”
value={selectedValue}
variant=”label-hidden”
options={options}
onchange={handleChange}
placeholder=”Select Industry to filter”
style=”color:grey;width:150px;”></lightning-combobox>
</div>
</template>

 
Output:

 

5 thoughts on “Apply CSS to lightning combobox in LWC in Salesforce

Leave a Reply