A form builder for React
# yarn
yarn add structoform
# npm
npm install structoform
- Checkbox
- DateField
- SelectField
- Radio Button
- TextArea
- TextField
- run
yarn link
- run
yarn prep
to build the package
An optional string containing a JSON parsable object. The contents of this object may override the className
, layout
, layoutDirection
or initValues
prop.
A className string to append to the <form>
wrapper className.
An object containing all the form fields, indexed by a unique key.
const layout = {
name: {
// field props
},
organisation: {
// field props
},
email: {
// field props
},
}
Determines how labels should position themselves relative to their respective form element. Specify either "row"
or "column"
.
A react element consisting of or containing a <button>
, to trigger the form onSubmit
logic.
Callback function for submit logic
Values to prefill the form with
Optional external form field state, essentially utilizing the form as a controlled component.
- Write documentation
- Add test
- Password Field
- Phone Field
- Autosuggest / Autocomplete
- Restrict input of DateField
- Support multiple languages