-
How can I adjust the placeholder text color in a fluent ui v9 input component? Using the browsers inspect tool I can see it uses
What's the best way to overwrite that? |
Beta Was this translation helpful? Give feedback.
Answered by
spmonahan
Apr 8, 2025
Replies: 1 comment 1 reply
-
There are several ways you can accomplish this but I think the best way in this case is with const useStyles = makeStyles({
input: {
"::placeholder": "blue"
}
});
const MyReactComponent = () => {
const styles = useStyles();
return <Input input={{ className: styles.input }} placeholder="Example that overrides placeholder color"/>
}; Here are some working examples: https://stackblitz.com/edit/sgl9mzsa?file=src%2Fexample.tsx |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
khmakoto
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are several ways you can accomplish this but I think the best way in this case is with
className
:Here are some working examples: https://stackblitz.com/edit/sgl9mzsa?file=src%2Fexample.tsx