{"id":16295161,"url":"https://github.com/wadackel/react-drip-form","last_synced_at":"2025-03-20T04:30:48.507Z","repository":{"id":143905123,"uuid":"90633847","full_name":"wadackel/react-drip-form","owner":"wadackel","description":":coffee: HoC based React forms state manager, Support for validation and normalization.","archived":false,"fork":false,"pushed_at":"2017-08-30T13:03:35.000Z","size":7536,"stargazers_count":65,"open_issues_count":4,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T00:24:43.789Z","etag":null,"topics":["drip-form","form","higher-order-component","hoc","normalization","react","state","validation"],"latest_commit_sha":null,"homepage":"https://tsuyoshiwada.github.io/react-drip-form/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wadackel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-08T13:54:06.000Z","updated_at":"2024-06-19T16:02:27.377Z","dependencies_parsed_at":null,"dependency_job_id":"39ecc3eb-6b0a-4f2d-aeb7-bb3a5461b2d2","html_url":"https://github.com/wadackel/react-drip-form","commit_stats":null,"previous_names":["tsuyoshiwada/react-drip-form"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadackel%2Freact-drip-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadackel%2Freact-drip-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadackel%2Freact-drip-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadackel%2Freact-drip-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wadackel","download_url":"https://codeload.github.com/wadackel/react-drip-form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244552060,"owners_count":20470984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drip-form","form","higher-order-component","hoc","normalization","react","state","validation"],"created_at":"2024-10-10T20:17:51.369Z","updated_at":"2025-03-20T04:30:46.872Z","avatar_url":"https://github.com/wadackel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![react-drip-form](https://raw.githubusercontent.com/tsuyoshiwada/react-drip-form/artwork/repo-banner.png)\n\n[![Build Status](http://img.shields.io/travis/tsuyoshiwada/react-drip-form.svg?style=flat-square)](https://travis-ci.org/tsuyoshiwada/react-drip-form)\n[![Codecov](https://img.shields.io/codecov/c/github/tsuyoshiwada/react-drip-form.svg?style=flat-square)](https://codecov.io/gh/tsuyoshiwada/react-drip-form)\n[![npm version](https://img.shields.io/npm/v/react-drip-form.svg?style=flat-square)](http://badge.fury.io/js/react-drip-form)\n\n\u003e HoC based React forms state manager, Support for validation and normalization.\n\nhttps://tsuyoshiwada.github.io/react-drip-form/\n\n\n\n\n## Table of Contents\n\n* [Features](#features)\n* [Getting Started](#getting-started)\n  * [Installation](#installation)\n  * [Basic usage](#basic-usage)\n    * [1. Create field component](#1-create-field-component)\n    * [2. Create form component](#2-create-form-component)\n    * [3. Mount the Form component](#3-mount-the-form-component)\n    * [4. Enjoy coffee break :coffee:](#4-enjoy-coffee-break-coffee)\n* [Documentation](#documentation)\n* [Related projects](#related-projects)\n  * [Components](#components)\n  * [Validator](#validator)\n* [ChangeLog](#changelog)\n* [TODO](#todo)\n  * [Core](#core)\n  * [Components](#components)\n* [Contribute](#contribute)\n* [License](#license)\n\n\n\n\n## Features\n\n* HOC based API. (No magic, transparent and open API)\n* Free component design. Integration with many UI frameworks.\n* Rule based validation, and Provide many built-in rules.\n* Support async and sync validation.\n* Support normalization.\n* Support Nest fields and Array fields.\n* Customizable error message. (Support i18n)\n\n\n\n\n## Getting Started\n\n\n### Installation\n\n```bash\n$ npm install --save react-drip-form\n```\n\n\n### Basic usage\n\n\n#### 1. Create field component\n\n**Input.js**\n\n```javascript\nimport React from 'react';\nimport { dripFormField } from 'react-drip-form';\n\nconst Input = ({\n  input,\n  meta: { error, dirty, touched },\n  ...props,\n}) =\u003e (\n  \u003cdiv\u003e\n    \u003cinput\n      {...props}\n      {...input}\n    /\u003e\n    {error \u0026\u0026 dirty \u0026\u0026 touched \u0026\u0026 \u003cspan style={{ color: 'red' }}\u003e{error}\u003c/span\u003e}\n  \u003c/div\u003e\n);\n\nexport default dripFormField()(Input);\n```\n\n\n#### 2. Create form component\n\n**Form.js**\n\n```javascript\nimport React from 'react';\nimport { dripForm } from 'react-drip-form';\nimport Input from './Input';\n\nconst Form = ({\n  handlers,\n  meta: { invalid, pristine },\n}) =\u003e (\n  \u003cform onSubmit={handlers.onSubmit}\u003e\n    \u003cdiv\u003e\n      \u003clabel htmlFor=\"email\"\u003eEmail-Address\u003c/label\u003e\n      \u003cInput\n        id=\"email\"\n        type=\"email\"\n        name=\"email\"\n        label=\"Email-Address\"\n        placeholder=\"Enter your Email-Address\"\n      /\u003e\n    \u003c/div\u003e\n\n    \u003cdiv\u003e\n      \u003clabel htmlFor=\"password\"\u003ePassword\u003c/label\u003e\n      \u003cInput\n        id=\"password\"\n        type=\"password\"\n        name=\"password\"\n        label=\"Password\"\n        placeholder=\"Enter your Password\"\n      /\u003e\n    \u003c/div\u003e\n\n    \u003cbutton\n      type=\"submit\"\n      disabled={invalid || pristine}\n      onClick={handlers.onSubmit}\n    \u003e\n      Submit\n    \u003c/button\u003e\n  \u003c/form\u003e\n);\n\nexport default dripForm({\n  validations: {\n    email: {\n      required: true,\n      email: true,\n    },\n    password: {\n      required: true,\n    },\n  },\n})(Form);\n```\n\n\n#### 3. Mount the Form component\n\n**App.js**\n\n```javascript\nimport React, { Component } from 'react';\nimport Form from './Form';\n\nexport default class App extends Component {\n  // Get valid values.\n  handleSubmit = (values) =\u003e {\n    console.log(values);\n  };\n\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003ch1\u003eLogin\u003c/h1\u003e\n        \u003cForm onValidSubmit={this.handleSubmit} /\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n```\n\n\n#### 4. Enjoy coffee break :coffee:\n\nYour work has complete!  \nLet's enjoy coffee break slowly.\n\n\n\n\n## Documentation\n\nSee [Document page](https://tsuyoshiwada.github.io/react-drip-form/).\n\n\n\n## Related projects\n\n### Components\n\n* [react-drip-form-components](https://github.com/tsuyoshiwada/react-drip-form-components)\n* [react-drip-form-material-ui](https://github.com/tsuyoshiwada/react-drip-form-material-ui)\n* [react-drip-form-bootstrap](https://github.com/tsuyoshiwada/react-drip-form-bootstrap)\n\n### Validator\n\n* [drip-form-validator](https://github.com/tsuyoshiwada/drip-form-validator)\n\n\n\n\n## ChangeLog\n\nSee [CHANGELOG.md](./CHANGELOG.md)\n\n\n\n\n## TODO\n\nWe are planning to proceed with work, but the contribution is greatly appreciated!\n\n### Core\n\n* [ ] File handling\n* [x] Testing section in Documentation\n* [ ] Support for Flow\n* [ ] Support for TypeScript\n\n### Components\n\n* [ ] [react-drip-form-toolbox](https://github.com/react-toolbox/react-toolbox)\n* [ ] [react-drip-form-rebass](https://github.com/jxnblk/rebass)\n* [ ] [react-drip-form-office-ui-fabric](https://github.com/OfficeDev/office-ui-fabric-react)\n* [ ] [react-drip-form-antd](https://github.com/ant-design/ant-design)\n\n\n\n\n## Contribute\n\n1. Fork it!\n1. Create your feature branch: git checkout -b my-new-feature\n1. Commit your changes: git commit -am 'Add some feature'\n1. Push to the branch: git push origin my-new-feature\n1. Submit a pull request :D\n\nBugs, feature requests and comments are more than welcome in the [issues](https://github.com/tsuyoshiwada/react-drip-form/issues).\n\n\n\n\n## License\n\n[MIT © tsuyoshiwada](./LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwadackel%2Freact-drip-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwadackel%2Freact-drip-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwadackel%2Freact-drip-form/lists"}