A pretty input and textarea form fields for React projects.
ES6 import:
import { PrettyInputText } from 'react-pretty-input';
// In JSX
<PrettyInputText name="email" labelText="Email Address" errorValue="Invalid Email Address" isRequired />
// In vanilla JS
React.createElement(PrettyInputText, { name: 'email', labelText: 'Email Address', errorValue: 'Invalid Email Address', isRequired: true});
This prop is the name attribute of the generated input tag.
This prop is the description string of the field. It's used to show the placeholder and the label of the input to describe it.
This prop is the default value of the component.
This prop is the description string of error occurred in the field. It's used to show the error in the label to describe it.
This prop is used to limit the input string length of the field.
This prop is used to indicate if the input string of the field is required. If the prop value is true
and the field is empty an error is showed in label and border field.
This prop is used to pass a callback function to validate de input value of the component. This function must return a boolean value.
This prop is used to pass a callback function invoked on input text change.
This prop is used to pass a callback function invoked on every key press event.
This prop is used to set the color of the label.
This prop is used to set the background color of the component.
This prop is used to set the css width of the component.
This prop is the name attribute of the generated input tag.
This prop is the description string of the field. It's used to show the placeholder and the label of the input to describe it.
This prop is the default value of the component.
This prop is used to limit the input string length of the field.
This prop is used to indicate if the input string of the field is required. If the prop value is true
and the field is empty an error is showed in label and border field.
This prop is used to pass a callback function invoked on input text change.
This prop is used to pass a callback function invoked on every key press event.
This prop is used to set the color of the label.
This prop is used to set the background color of the component.
This prop is used to set the css width of the component.
Use Github issues for feature requests and bug reports. We actively accept pull requests.
MIT