# formik-alfalab-core-components

> Bindings for Formik and Alfalab's Core Components

Latest version **4.1.6** (published 2026-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install formik-alfalab-core-components
pnpm add formik-alfalab-core-components
yarn add formik-alfalab-core-components
bun add formik-alfalab-core-components
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 4.1.6 |
| Published | 2026-09-11 |
| First published | 2022-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 54.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Ivan |
| Maintainers | ekabolotina |
| Keywords | formik, react |

## Links

- npm: https://www.npmjs.com/package/formik-alfalab-core-components
- Repository: https://github.com/ekabolotina/formik-alfalab-core-components
- Homepage: https://github.com/ekabolotina/formik-alfalab-core-components#readme
- Issues: https://github.com/ekabolotina/formik-alfalab-core-components/issues
- npm.io page: https://npm.io/package/formik-alfalab-core-components

## 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

- 4.1.6 (latest) — 2026-09-11
- 4.1.5 — 2026-04-17
- 4.1.4 — 2026-03-19
- 4.1.3 — 2026-03-12
- 4.1.2 — 2026-01-28
- 4.1.1 — 2025-03-05
- 4.1.0 — 2025-03-04
- 4.0.0 — 2024-12-13
- 3.0.0 — 2024-11-27
- 2.0.0 — 2024-11-27
- 1.0.0 — 2023-12-21
- 0.4.0 — 2023-12-15
- 0.3.1 — 2023-09-30
- 0.3.0 — 2022-09-24
- 0.2.0 — 2022-08-31
- … 7 more at https://npm.io/package/formik-alfalab-core-components/versions

## README

# formik-alfalab-core-components

Bindings for [formik](https://formik.org/) and [@alfalab/core-components](https://github.com/core-ds/core-components).

## Usage

Just use the components from `formik-alfalab-core-components` as a drop-in replacement of the components 
from `@alfalab/core-components`, but with one required prop `name`. Available components are:
* AmountInput
* Checkbox
* Input
* InputAutocomplete
* MaskedInput
* PhoneInput
* RadioGroup
* Select
* Switch
* Textarea

Consider the example:
```tsx
import React from 'react';
import { Formik, Form } from 'formik';
import { Input } from 'formik-alfalab-core-components/Input';

export const MyForm: FC = () => {
    return (
        <Formik 
            initialValues={{ name: '' }} 
            onSubmit={(values) => { console.log(values) }}
        >
            <Form>
                <Input name="name" />
                <button type="submit">Submit</button>
            </Form>
        </Formik>
    );
};
```

### Exports

Each component can be imported from the subdirectory:
```tsx
import { Input } from 'formik-alfalab-core-components/Input';
```
This library also exposes some utility hooks which are used under the hood by components:
* `useFieldBlurState` — useful for handling `blur` event inside formik context;
* `useFieldOkState` — provides `error` and `success` props using formik state; 
* `useInputFieldState` — provides `props: InputProps` using formik state;
* `useSelectFieldState` — provides `props: BaseSelectProps` using formik state.

These hooks are available under `formik-alfalab-core-components/hooks` and can be used 
to bind your custom components to formik.

## How does it work?

Under the hood it connects to the Formik's state via `useField` hook and `name` prop.
Then the given state is passed to original component from `@alfalab/core-components`.

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