Minimal Form & Input React Components.
Provides Form, Input, Textarea, Radio, Checkbox and Select component
![npm download](https://camo.githubusercontent.com/8fadc05556e8c9d3eaf25e370475d145c151c35afdedc3d4452f000c3039eebe/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f406a346a696e78782f666f726d2e737667)
import Form, { Input, Select, Checkbox, Radio } from '@j4jinxx/form';
Name |
Type |
Default |
Description |
onDone |
func |
( ) => { } |
Callback fired when Form gets validated and submitted (returns form current Ref) |
children |
node |
|
Form children (input, radio, select, checkbox) |
Name |
Type |
Default |
Description |
name |
string |
|
Input field name |
type |
string |
text |
Input field type |
label |
string |
|
Input field label |
showLabel |
bool |
true |
If false, field label is hidden |
withGroup |
bool |
true |
If false, field margin is removed |
Name |
Type |
Default |
Description |
name |
string |
|
Select field name |
options |
array |
[ ] |
Select field options ( [{ label, value }, { label, value }] ) |
label |
string |
|
Select field label |
showLabel |
bool |
true |
If false, field label is hidden |
withGroup |
bool |
true |
If false, field margin is removed |
Name |
Type |
Default |
Description |
name |
string |
|
Checkbox field name |
options |
array |
[ ] |
Checkbox field options ( [{ label, value }, { label, value }] ) |
label |
string |
|
Checkbox field label |
showLabel |
bool |
true |
If false, field label is hidden |
withGroup |
bool |
true |
If false, field margin is removed |
selectedValues |
array |
[ ] |
Default Checked Options |
inline |
bool |
true |
If true, Checkbox options shown inline |
Name |
Type |
Default |
Description |
name |
string |
|
Radio field name |
options |
array |
[ ] |
Radio field options ( [{ label, value }, { label, value }] ) |
label |
string |
|
Radio field label |
showLabel |
bool |
true |
If false, field label is hidden |
withGroup |
bool |
true |
If false, field margin is removed |
selectedValue |
any |
|
Default Checked Option |
inline |
bool |
true |
If true, Radio options shown inline |