React Select custom IndicatorContainer

68 Views Asked by At

I am trying to target the indicator container to customise the css, I'm importing customstyles and managed to manipulate the rest of the component. Just not the indicator container...

Tried targeting it by using the custom style "indicatorContainer" const customStyles = () => { return { indicatorContainer: (provided) => ({ ...provided, padding: 0, height: "24px", }) }; };

The react-select library says IndicatorsContainer. Tried that also but no prevail...

Also tried "0px" instead of 0 too...

1

There are 1 best solutions below

0
Steve -Cutter- Blades On

It depends, as there are several things to style around the indicator. You can style the indicatorContainer, the clearIndicator, the indicatorSeparator, the dropdownIndicator... You just have to target your styling to the correct element.