Components – legacy
Text input
Examples of text input with built-in custom validation.
<Form isVertical onSubmit={function noRefCheck() {}} onValidate={function noRefCheck() {}} > <TextInput name="textExample1" onChange={function noRefCheck() {}} value="" /> <Button block className="mt-3" inverted type="submit" > Validera </Button> <p> Open console to view validations </p> </Form>
Properties
TextInput
| Prop name | Type | Default Value | Description |
|---|---|---|---|
| errorMessageMax | string | 'Texten är för lång.' | |
| errorMessageMin | string | 'Texten är för kort.' | |
| errorMessageRequired | string | 'Du måste ange en text.' | |
| isRequired | bool | true | |
| label | string | 'Text' | |
| helpMessage | string | ||
| infoMessage | string | ||
| isLessSpace | bool | ||
| isMultiline | bool | ||
| max | number | ||
| min | number | ||
| name * | string | ||
| onBlur | func | ||
| onChange * | func | ||
| onFocus | func | ||
| showCharCounter | bool | ||
| validateFn | func | ||
| value * | union |
Accessibility
This component has been validated to meet the WCAG 2.1 AA accessibility guidelines.
