Field
Usage and props
The Field component can be used as input, select or textarea. it's fully accessible (a11y)
| Prop | Type | Description |
|---|---|---|
| disabled | Boolean | it specifies that a field should be disabled. |
| dot | Boolean | If true, a dot will be displayed on the side of the label to indicate a required field |
| error | String | displays an error message (when its value is not null) |
| icon | JSX.Element | displays an icon to the left of the field |
| label | String | label of the field |
| *name | String | name of the field |
| ref | any | React ref |
| *type | String | type of the field (select, textarea, text, number, checkbox, password etc...) |
You can also use all the default html attributes for each type of field such as (placeholder, onClick, onChange, onBlur and others ...)