Material-ui: Changing the color of the inputted text on a text field

Created on 22 Oct 2015  ·  3Comments  ·  Source: mui-org/material-ui

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.

Most helpful comment

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

All 3 comments

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

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

@chmann super useful. thank you

Was this page helpful?
0 / 5 - 0 ratings