
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
react-formalize
Advanced tools
npm install react-formalize --save
import { Component } from 'react';
import { Form, Text, Select } from 'react-formalize';
export default class MyForm extends Component {
handleSubmit(values) {
console.info('Submit', values);
// {
// title: 'Lorem ipsum dolor ist',
// category: 'news'
// };
}
render() {
const post = {
title: 'Lorem ipsum dolor ist',
category: 'news'
};
return (
<Form
values={post}
onSubmit={this.handleSubmit}
onChange={this.handleChange}>
<div>
<label>Title</label>
<Text
name="title"
placeholder="Enter title"/>
</div>
<div>
<label>Category</label>
<Select
name="category"
placeholder="Choose category..."
options={{news: 'News', sport: 'Sport'}}/>
</div>
<div>
<button type="submit">Submit</button>
</div>
</Form>
);
}
}
<Form>Form component, manages data and events
view: (Function) the element your content will be rendered inchildren: (Component|Function) children componentsvalues: (Object) the form's initial valuesmessages: (Object) validation messages by input namesonSubmit: (Function) submit handleronChange: (Function) change handlerdisabled: (Boolean) disable form and it inputs<Form
onSubmit={this.onSubmit}
onChange={this.onChange}
values={post}
messages={messages}
disabled={saving}>
{/* Input components ... */}
</Form>
<Input>Input component wrapper, connects to Form component, receives and propagates data, do not use directly.
name: (String) name of the input fieldvalue: (Array|Boolean|Number|Object|String) value of the input fieldserialize: (Function) function that extracts the input's data from the change eventchildren: (Component) children componentsimport React, { PropTypes, Component } from 'react';
import { Input } from 'react-formalize';
export default class MyCustomTextField extends Component {
renderInput(props) {
return ;
}
render() {
return (
<Input {...this.props}>
{props => <input type="text" {...props}/>}
</Input>
);
}
}
<Message>Message component, connects to Form component, receives messages
name: (String) name of the related input fieldrenderMessage: (Function) render a custom messagechildren: (Function) children components<Form>
<Text name="title"/>
<Message name="title">{message => <p>{message}</p>}</Message>
</Form>
<Text>Native text input component
name: (String) name of the input fieldtype: (String) One of: text, date, datetime, datetime-local, email, month, number, password, tel, time, search, url, week. Default is text<Form>
<Input name="title"/>
<button type="submit">Submit</button>
</Form>
Run the simple example:
cd react-formalize
npm install
cd react-formalize/examples/simple
npm install
npm start
MIT
FAQs
Serialize react forms
The npm package react-formalize receives a total of 4 weekly downloads. As such, react-formalize popularity was classified as not popular.
We found that react-formalize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.