Skip to content

How to style Input Placeholder Fluent UI V9 color? #34002

Answered by spmonahan
clemwo asked this question in Q&A
Discussion options

You must be logged in to vote

There are several ways you can accomplish this but I think the best way in this case is with className:

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@clemwo
Comment options

Answer selected by khmakoto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants