It seems like you're saying that the root
element doesn't have any styles (except for
position: relative; box-sizing: border-box;
) so it's unclear what specific styles you want to change. However, you can define styles for it by targeting its
className
.
For example:
<Select
className="container"
/>
.container {
background: red;
}
https://codesandbox.io/s/hungry-hawking-2prwd?file=/example.js
Just a heads-up: react-select does not provide a prop for styling the root element because it is unnecessary. The purpose of the styles
prop is to handle scoped inner classes (Example here), which is not applicable to the root element.