# client-form

> A react component to build forms

Latest version **0.9.7** (published 2019-12-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install client-form
pnpm add client-form
yarn add client-form
bun add client-form
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.7 |
| Published | 2019-12-01 |
| First published | 2019-02-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 98 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Paolo Senese |
| Maintainers | braindrained |
| Keywords | react, form, responsive, customizable |

## Links

- npm: https://www.npmjs.com/package/client-form
- Repository: https://github.com/braindrained/client-form
- Homepage: https://github.com/braindrained/client-form#readme
- Issues: https://github.com/braindrained/client-form/issues
- npm.io page: https://npm.io/package/client-form

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

- 0.9.7 (latest) — 2019-12-01
- 0.9.6 — 2019-12-01
- 0.9.5 — 2019-11-24
- 0.9.3 — 2019-09-30
- 0.9.2 — 2019-09-29
- 0.9.1 — 2019-09-27
- 0.9.0 — 2019-09-23
- 0.8.9 — 2019-09-23
- 0.8.8 — 2019-09-22
- 0.8.6 — 2019-09-22
- 0.8.5 — 2019-09-21
- 0.8.3 — 2019-09-21
- 0.8.2 — 2019-09-19
- 0.8.1 — 2019-09-19
- 0.8.0 — 2019-09-12
- … 86 more at https://npm.io/package/client-form/versions

## README

# Form component
A component exportable for standard forms, demo: https://braindrained.github.io/client-form/

#### Install from npm
```sh
> npm install client-form
or
> yarn add client-form
```

#### Developing
Clone, install dependencies and run the component in development mode.
```sh
> git clone git@github.com:braindrained/client-form.git client-form
> cd client-form
> yarn
> yarn start
```
Open http://localhost:3007 to view it in the browser.

#### Import the component

Import

`import Form from 'client-form';`

Use it

```sh
<Form {...{
	controls: [
		{
			control: 'text',
			type: 'text',
			name: 'firstName', // if label and placeholder are not specified this text will be the placeholder and label text decamelized
			limitChar: 25, // length check
		}
	],
	sendButton: {
		text: 'Save changes',
		style: { margin: '0 auto', float: 'none' },
	},
	sendForm: (e) => {
		const promise = new Promise((resolve, reject) => {
			yourFetch({ dataObject: e }).then((x) => {
				if (x.succeed) {
					resolve({ succeed: true, message: 'success mesage' });
				} else {
					reject({ succeed: false, message: 'error message' });
				}
			});
		});
		return promise;
	}
}}/>
```

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