# formik-paste

> simple declarative bindings for Formik and Twilio React Paste components.

Latest version **1.0.2** (published 2020-08-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install formik-paste
pnpm add formik-paste
yarn add formik-paste
bun add formik-paste
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-08-14 |
| First published | 2020-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 821.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Van Nguyen |
| Maintainers | vnguyen94 |
| Keywords | react, formik, twilio, paste, form |

## Links

- npm: https://www.npmjs.com/package/formik-paste
- Repository: https://github.com/vnguyen94/formik-paste
- Homepage: https://github.com/vnguyen94/formik-paste#readme
- Issues: https://github.com/vnguyen94/formik-paste/issues
- npm.io page: https://npm.io/package/formik-paste

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-08-14
- 1.0.1 — 2020-08-10
- 1.0.0 — 2020-08-10

## README

[Storybook](https://vnguyen94.github.io/formik-paste) | [CHANGELOG](https://github.com/vnguyen94/formik-paste/releases) | [npm](https://www.npmjs.com/package/formik-paste)

# formik-paste

Super-charged [Paste](https://paste.twilio.design) components using [Formik](https://github.com/jaredpalmer/Formik) to handle form state.

This library lightly wraps Paste components with a required `name: string` prop that connects them to a Formik form field. Simply change form component imports from `@twilio-paste/core` to `formik-paste`, and set their `name` prop. Doing so will link the Paste component with a `Formik` field under the hood!

## Getting started

```bash
npm install formik-paste
```

## Usage:

```tsx
import { Button, FormLabel, FormHelpText } from '@twilio-paste/core';
import { Theme } from '@twilio-paste/theme';
import { Formik } from 'formik';
import { FormInput } from 'formik-paste';
import * as React from 'react';

function App() {
  return (
    <Theme.Provider theme="default">
      <Formik
        initialValues={{ emailAddress: '' }}
        onSubmit={(values) => {
          window.alert(JSON.stringify(values));
        }}
      >
        {({ handleSubmit }) => (
          <form onSubmit={handleSubmit}>
            <FormLabel htmlFor="emailAddress">Email Address</FormLabel>
            <FormInput id="emailAddress" name="emailAddress" type="email" placeholder="example@twilio.com" />

            <Button variant="primary" type="submit">
              Submit
            </Button>
          </form>
        )}
      </Formik>
    </Theme.Provider>
  );
}
```

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## Acknowledgements

Heavily inspired by [formik-antd](https://github.com/jannikbuschke/formik-antd/).

## License

[MIT](https://choosealicense.com/licenses/mit/)

---
_Source: https://npm.io/package/formik-paste · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
