1.0.10 • Published 7 years ago
@fenderdigital/react-text-field v1.0.10
TextField for Fender React UI Kit
Description
A compound component used to render input fields. It will also perform field validation..
Installation and Usage
yarn add @fenderdigital/react-text-field --saveimport TextField from '@fenderdigital/react-text-field';Props
autoComplete- enables / disabled this browser feature for input fields.children- renders any child elements.containerStyles- configurable tachyon classes.dataId- data id value. mainly, for automation testing.disabled- option to disable the input field.errorMessage- error messaging that is rendered byFieldError.initialValue- optional input field value.value- Use to set input field value. Must be paired withonChangeifTextFieldis to be updated afterinputStyles- configurable tachyon classes for the input field element.onChange-onChangecallbackonBlur-onBlurcallbackonFocus-onFocuscallbackonClick-onFocuscallbackplaceholder- text (or html) for the input field's placeholder attribute.type- input field type
| propName | propType | defaultValue | isRequired |
|---|---|---|---|
| autoComplete | string | off | - |
| children | node | null | - |
| containerStyles | string | '' | - |
| dataId | string | text-field | - |
| disabled | boolean | false | - |
| errorMessage | string | null | - |
| initialValue | string | '' | - |
| value | string | '' | - |
| inputStyles | string | '' | - |
| onChange | func | () => {} | - |
| onBlur | func | null | - |
| onFocus | func | () => {} | - |
| onClick | func | () => {} | - |
| placeholder | node | '' | - |
| type | string | text | - |
Development
Check the Monorepo README for development documentation.