
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
formik-material-ui
Advanced tools
[](https://travis-ci.org/stackworx/formik-material-ui) [](./LICENSE) [.
yarn add formik-material-ui
Then, import the components you need to use with Formik in the file you have your form component set up. The components avaliable are:
In this case we will use <TextField />
.
import { Formik, Field, Form } from 'formik';
+ import { TextField } from 'formik-material-ui';
Next, in your Formik form component, pass this <TextField />
component as the component
prop of the Formik <Field />
component:
<Field
name="email"
label="Email"
type="email"
+ component={TextField}
/>
Now you can add any of the Material UI props to the <Field />
component and <TextField />
will be able to accept them.
<Field
name="email"
label="Email"
type="email"
component={TextField}
+ margin="normal"
+ fullWidth
/>
onChange
import MuiTextField from '@material-ui/core/TextField';
import {fieldToTextField, TextField, TextFieldProps} from 'formik-material-ui';
...
const UppercasingTextField = (props: TextFieldProps) => (
<MuiTextField
{...fieldToTextField(props)}
onChange={event => {
const {value} = event.target;
props.form.setFieldValue(
props.field.name,
value ? value.toUpperCase() : ''
);
}}
/>
);
...
import {fieldToTextField} from 'formik-material-ui';
<Field name="name" render={(props) => (<div>
<Comp1 {...fieldToText(props)}>
<Comp2 {...fieldToText(props)}>
...
</div>)} />
yarn install
yarn storybook
yarn prepublishOnly
FAQs
  [![license](https://badgen.now.sh/badge/license/MIT
The npm package formik-material-ui receives a total of 16,164 weekly downloads. As such, formik-material-ui popularity was classified as popular.
We found that formik-material-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.