I'm trying to override react-select styles to achieve rounded multiValue tags.
So I went ahead and edited the multiValue style attribute like this:
const customStyles = {
multiValue: (styles) => ({
...styles,
backgroundColor: blue,
borderRadius: "50%",
}),
}
The background color works perfectly and the tag becomes blue. However the border radius is always stuck at 2px...
<Select
options={options}
styles={customStyles}
isMulti
/>
How to override the default 2px border-radius imposed by react-select
It turned out that I was overriding the background color of the multiValueLabel, which was somehow hiding the overridden border-radius in multiValue. Removing the backgroundColor attribute from the multiValueLabel solved the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With