Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Form Rendering Library written in React

License

NotificationsYou must be signed in to change notification settings

projectstorm/react-forms

Repository files navigation

Note: use formik instead :)

DEMO:http://projectstorm.cloud/react-forms

A super simple, no-nonsense form library written in React that (hopefully) just works.

Join the chat at https://gitter.im/projectstorm/react-formsNPMNPMCircleCI

Demo1

Start Here

Forms in React can be quite difficult, but with this library, forms become quite easy.Storm React Forms (SRF) provides a simple way to create forms in a very declarative way.

Declare your form using standard react widgets, but make use ofStorm Element Widgetswhen you want to actually use an input field. When you click submit on your form, the formwill fire aformSubmitEvent(model) which will contain an object with all the values in your form.

Example

<FormWidgetformSubmitEvent={model=>console.log(model)}><TableLayoutWidget><FieldElementWidgetname="Name"/><FieldElementWidgetname="Surname"/></TableLayoutWidget></FormWidget>

The model will contain {Name, Surname}

One-way binding

you can pass avalue={object} onto a form and it will automatically populateyour form fields with the values in the object. This does not changeobject when the form firesbut instead will pass the new object as the first param in theformSubmitEvent(object) (like in the previous example)

Usage

Take a look at the demos URL as well as the demos folder (docs will follow soon)

About

Form Rendering Library written in React

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp