score:2
Accepted answer
you will need to style the <option>
s:
<select bg="black" color="white">
<option style={{ color: 'black' }} value="option1">
option1
</option>
<option style={{ color: 'black' }} value="option2">
option2
</option>
</select>;
note that if you add a placeholder to <select>
, it will still be white on white when opened.
another curious thing is that this problem does not happen in safari, there the dropdown looks just like a standard os menu.
Source: stackoverflow.com
Related Query
- Chakra UI: Change option text color and option background in Select
- How to change the text color and background color of ant-tooltip component
- MaterialUI: Why does setting background color on Select component hides the InputLabel text and how could I avoid it happening?
- How to change the background and text color within button using button onClick in React JS
- Unable to change selected option background color | React Select
- How to make a filter component like Google chrome find (Cntrl + F) that detects the text and change it's background color
- How to change button background color and text color using setSate in react?
- Material ui Select change background and focused color
- MUI Change css of Label of Select and color of selected option
- Change color of Select component's border and arrow icon Material UI
- MUI Button hover background color and text color
- How to change text, icon and underline color of Select in Material UI
- Change page background color with each route using ReactJS and React Router?
- CSS & React / Transition to change background color and font color isn't working
- Material UI Select focus and selected background color
- How to change the background color of MUI Menu Popover of TextField with select property?
- Partially change text color in Select (Ant Design)
- Material UI styled() utility - How to recursively change highlighted text background color
- TextField Background change background color when selecting a text from sugestions
- How to change the background or text color of the countdown timer to green when there is only 30 minutes remaining to finish the countdown?
- How to change the background color of the div while focusing the text Input field?
- How to change image and background color every x seconds. React
- How to individually change text color and font weight in the same div element using Tailwind CSS and React
- ReactJS change color of the selected option in a select option control
- How to render a div component multiple times with different background color and text in React?
- How to change the background color of the Chakra UI Progress component?
- How Do I make my Nav Menu option change color or background when I click on it using Javascript only?
- Heading Component change text color based on the background in React / Gatsby / Styled-components
- How to change the background color of the Chakra UI Toast component?
- How can I set a different color for text and background of canvas HTML?
More Query from same tag
- Property 'Choices' does not exist on type 'Promise<IFieldInfo>'
- React Context API doesn't work for single application dialog
- Flux / Fluxible: Updating routes based on state change
- Nginx locations
- ReactJS with ES6 class in state: change only once
- How to pass variables when calling components
- React - how to add boolean field on props when using map(), given that the field will be changing
- Filter data of an array in setState in reactjs
- Is there a way to solve any jest package issues?
- Why is my ipcMain returning an empty array after reading through a database?
- How to use visualforce page with lightning:container React in Lightning app builder?
- Why child Styled-components is not applying styles?
- Best input type to record a time Duration in Html
- Rendering React components according to Amplify logged in user
- How to generate sitemap with react router
- React Stripe - Map State to Props on a stripe injected component?
- ReactJS - Component Still live after re-render of father
- how to restrict access to the route
- Array from nested serializer is undefined. REDUX, DRF
- convert react js files to tsx files
- Serving a React app from Node while also having an API
- Production React website not rendering properly
- Function inside React Functional Component loses context when being passed down to child component
- React: How to implement the react-hook-form in my reusable input component
- How to convert multiple objects to a single array and count the length of the objects in javascript?
- How to push to History in React Router v4?
- How to make a search box functionality in React without using any 3rd party library
- React ReferenceError:unknown node of type "JSXSpreadChild" with constructor "Node"
- Jest and React Testing Library, how to test if an element is hidden?
- Modifying one entry in this.state deletes all other entries in React JS State Object