Apply CSS to lightning combobox in LWC in Salesforce

Apply CSS to lightning combobox in LWC in Salesforce

Use style attribute 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:

Leave a Reply