Skip to content

Instantly share code, notes, and snippets.

@bnymn
Created October 10, 2021 17:14
Show Gist options
  • Save bnymn/637d3de63acb3efceb3b33cdbf7ce674 to your computer and use it in GitHub Desktop.
Save bnymn/637d3de63acb3efceb3b33cdbf7ce674 to your computer and use it in GitHub Desktop.
Username and password fields are added
import { Formik, Field, Form } from 'formik';
export default function LoginForm() {
return (
<Formik
initialValues={{
username: '',
password: '',
}}
onSubmit={() => {
}}
>
<Form>
<Field id="username" name="username" placeholder="Username" />
<Field type="password" id="password" name="password" placeholder="Password" />
<button type="submit">Login</button>
</Form>
</Formik>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment