Does MUI have a form component?

Viewed 610

I have a form with multiple FormControl (https://mui.com/api/form-control/) components and I have them wrapped in a:

const FormBody = styled(Box)(() => ({
  display: 'flex',
  flexDirection: 'column',
}));
<FormBody onSubmit={handleSubmitLogin(onLoginSubmit)} component="form">
  <FormControl>
  ...

But I was hoping to create some CSS rules in the theme of MUI but I can't find any component that can be used to encapsulate the FormControl components.

1 Answers

If you're expecting something like Ant Design's Form, then no there isn't any component like that, just use the native form element or Box component='form' to easily customize the styles.

Related