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

Related issues

rbozan picture rbozan  路  3Comments

finaiized picture finaiized  路  3Comments

iamzhouyi picture iamzhouyi  路  3Comments

pola88 picture pola88  路  3Comments

chris-hinds picture chris-hinds  路  3Comments