TextInput
TextInput is a field that accepts one line of text.
const TextInputExample = () => (
<Form submit={() => {})}>
<TextInput placeholder="Hello, World!" name="hello" />
<TextInput
placeholder="default value" value="This is a default value" name="hello2" />
</Form>
);
Props
name(string, required): This will map to the key in the formlabel(string): This will be displayed near the fieldplaceholder(string): Text to show the user before a value existsrequired(bool): Will tell the field to display a required star next to the labelvalidator(func): a validator functionvalue(string): This is the default value of the field