material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

Changing the color of the inputted text on a text field

Open anthony-dandrea opened this issue 11 years ago • 3 comments

After looking at the docs and the code there doesn't appear to be a good way to change the color of the text inside the input field itself. Default color is black rgba(0, 0, 0, 0.87). Something similar to underlineFocusStyle or hintStyle would be awesome.

anthony-dandrea avatar Oct 22 '15 19:10 anthony-dandrea

If you need to change text color of all inputs in your app or component then you can use Theme Overrides to do this. See Overriding Theme Variables section of http://material-ui.com/#/customization/themes

as i see input text is defined in textField.textColor here: https://github.com/callemall/material-ui/blob/master/src/styles/theme-manager.js#L185

isilweo avatar Oct 27 '15 14:10 isilweo

It's not in the docs but you can use inputStyle as a prop to TextField to style the input directly.

chmann avatar Nov 02 '15 19:11 chmann

@chmann super useful. thank you

anthony-dandrea avatar Nov 09 '15 21:11 anthony-dandrea