When using ordinary CSS if you want to style your place holder you use these css selectors :
::-webkit-input-placeholder {
color: red;
}
But I can't figure out how to apply these type of styles in react inline styles.
You can't use ::-webkit-inline-placeholder
inline.
It is a pseudo-element that (much like e.g. :hover
) can only be used in your stylesheet:
The non-standard proprietary
::-webkit-input-placeholder
pseudo-element represents the placeholder text of a form element.
Instead, assign a class to the React component via the className
property and apply the style to this class.