Examples and usage guidelines for form control styles, layout options, and custom components for creating a wide variety of forms.
| Component Name | Development Status |
|---|---|
| TextInput | DONE |
| NumberInput | DONE |
| SelectInput | DONE |
| TextArea | DONE |
| FormGroup | DONE |
| FormLabel | DONE |
| FormHint | DONE |
| FormValidationMessage | DONE |
You can find all examples for components developed in this module here.
Very basic TextInput component examples.
You can use TextInput component as inline.
You can use different size variants for TextInput.
This component composes styled-system
| Property Name | Type | Description |
|---|---|---|
| size - 'md' | enum | Size of input. Same as button. Default is 'md' |
| inline - false | bool | Pass this prop if the input is display: inline-block and width: auto. |
| transparent - false | bool | Pass this prop if input is transparent. (Shows border when hovered.) |
| minimal - false | bool | Pass this prop if input has a border-bottom only and no hover&focus effects. |
Very basic NumberInput component examples.
You can also use decimal values too.
You can find some advanced NumberInput component examples here.
Format with pattern : Format credit card as text.
Mask can also be a array of string. Each item corresponds to the same index #.
This component composes react-number-formatstyled-system
| Property Name | Type | Description |
|---|---|---|
| size - 'md' | enum | Size of input. Same as button. Default is 'md' |
| inline - false | bool | Pass this prop if the input is display: inline-block and width: auto. |
| transparent - false | bool | Pass this prop if input is transparent. (Shows border when hovered.) |
Very basic SelectInput component examples. No search and other capabilities. Use Combobox component for advanced functionality.
You can use different size variants for SelectInput.
This component composes styled-system
| Property Name | Type | Description |
|---|---|---|
| size - 'md' | enum | Size of input. Same as button. Default is 'md' |
| inline - false | bool | Pass this prop if the input is display: inline-block and width: auto. |
You can use TextArea component for multi-line inputs.
This component composes styled-system
| Property Name | Type | Description |
|---|---|---|
| rows - 2 | number | |
| autoResize - false | bool | |
| transparent | bool | |
| size - 'md' | enum |
You can find some examples using all of the form elements.
You can also use forms as inline.