As per the react-select official docs, there is a two ways to edit the styles by class names.
1. Static, by setting the classNamePrefix and overriding the componen class names in your own less or css file:
Styles in your less file:
.react-select-container {
.react-select__menu-list {
background-color: #4ca6f1;
}
}
React component:
<Select
{...props}
className="react-select-container"
classNamePrefix="react-select"
/>
HTML output:
<div class="react-select-container">
<div class="react-select__control">
<div class="react-select__value-container">...</div>
<div class="react-select__indicators">...</div>
</div>
<div class="react-select__menu">
<div class="react-select__menu-list">
<div class="react-select__option">...</div>
</div>
</div>
</div>
2. Dynamically, by setting classnames using prop classNames:
React component:
<Select
classNames={{
control: (state) => state.isFocused ? 'border-red-600' : 'border-grey-300',
}}
/>