Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I would like to make a default change to the look of all input fields #4137

Open
1 task done
dowling-john opened this issue Mar 20, 2024 · 5 comments
Open
1 task done

Comments

@dowling-john
Copy link

Prerequisites

What theme are you using?

core

What is your question?

I would like to set the border on all input types to underline, I can see a way to modify the border option.

Any help would be appriciated

@dowling-john dowling-john added needs triage Initial label given, to be assigned correct labels and assigned question labels Mar 20, 2024
@heath-freenome
Copy link
Member

@dowling-john Can you provide more information, such as which theme are you using?

@heath-freenome heath-freenome added awaiting response and removed needs triage Initial label given, to be assigned correct labels and assigned labels Mar 22, 2024
@dowling-john
Copy link
Author

Ok so here is my theme definition

`export const Theme = createTheme({
palette: {
primary: {
main: '#077D8DFF',
},
secondary: {
main: '#077D8DFF',
},
},
typography: {
fontFamily: [
'Quicksand'
].join(','),
},
spacing: 6,
});

`

I am using https://mui.com/core/ to render the components, I am sure that this is because the elements gerated are not the same as the ones in mui core, so what I would like to do is manipulate the borders on all input elements, and would like to klnow how to define borders in the theme

thanks

@heath-freenome
Copy link
Member

@dowling-john Well, first of all the @rjsf/mui theme is using @mui/material out of the box with no other modifications. It seems like if you followed the theming guide you should be able to affect the look and feel of the components.

@dowling-john
Copy link
Author

After looking at this for a while it would seem that this is the issue

#1987

It would seem that by default an OutlinedInput component is used rather then just a normal Input component, is there a way that I can defind it to use the Iput componet rather then the Outlined one ?

@heath-freenome
Copy link
Member

heath-freenome commented Apr 1, 2024

@dowling-john The Mui theme, out of the box uses the outlined variant because that is the default that @mui/material uses. You should be able to use the theming guide to provide a different theme for material-ui... You can also override the BaseInputTemplate to change the variant per the second example here. Again, there is nothing specific to RJSF that is blocking you from changing the look and feel of material-ui via their usual mechanisms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants