Skip to content

Is it possible to pass the variant prop to inputs currently? #381

Answered by vip-git
timayy asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @timayy ,

Yes you can pass any prop mentioned to change the text fields.

There are 2 options:

  1. Use mui:variant attribute in uiSchema
    Example can be seen here for multiline .
you can prefix mui: followed by the prop name and value to use them in your uiSchema
  1. You can make use of Theme and change the props directly for all inputs
    Example can be seen here

You can also read more about overriding attributes using theme from Material UI Docs.

My recommendation would be to go 2nd way to be consistent and use theme overrides.

I hope this answers your question @timayy. Thanks for raising it.

You can also read more in this issue #361 where uiSchema was used but in your case theme override wo…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by vip-git
Comment options

You must be logged in to vote
8 replies
@vip-git
Comment options

@timayy
Comment options

@vip-git
Comment options

@vip-git
Comment options

@timayy
Comment options

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