4.9.0 • Published 3 years ago

@tdcerhverv/text-input v4.9.0

Weekly downloads
250
License
Apache-2.0
Repository
bitbucket
Last release
3 years ago

MaterialTextInput component

State

Usage

Import like this:

import { MaterialTextInput } from '@tdcerhverv/text-input';

This component can be used as a single line Text Field, a flexible Multiline input, or a larger Text Area:

//1. Single Line:
<MaterialTextInput />

//2. Multiline:
<MaterialTextInput multiline />

//3. Text Area:
<MaterialTextInput multiline rows={numberOfRows} />

Props

All standard input props work, and then these as well:

labelText?: string;
error?: string | boolean;
hideValidation?: boolean;
validateBeforeFocus?: boolean;
loading?: boolean;
showClearIndicator?: boolean;
assistiveText?: string;
characterLimit?: number;
characterLimitErrorMsg?: string;
ref?: React.Ref<HTMLInputElement>;

Additionally, as this component is built upon a Material-UI TextField component, all standard props for that component are accepted. In particular, the multiline and rows props are used as detailed above in usage.

Tags

text-input, input, textarea, form, forms

TextInput component

State

Usage

Import like this:

import { TextInput } from '@tdcerhverv/text-input';

Props

All standard input props work, and then these as well:

interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {
  labelText?: string;
  error?: string | boolean;
  hideValidation?: boolean;
  loading?: boolean;
  ref?: React.Ref<HTMLInputElement>;
}

Tags

text-input

4.9.0

3 years ago

4.8.0

3 years ago

4.7.6

3 years ago

4.7.5

3 years ago

4.7.4

3 years ago

4.7.3

3 years ago

4.7.2

3 years ago

4.7.1

3 years ago

4.7.0

3 years ago

4.6.0

4 years ago

4.5.0

4 years ago

4.4.0

4 years ago

4.3.0

4 years ago

4.2.0

4 years ago

4.1.1

4 years ago

4.1.0

4 years ago

4.0.0

4 years ago

3.2.0

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.2.5

4 years ago

2.2.4

4 years ago

2.2.3

4 years ago

2.2.2

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

5 years ago

1.0.0

5 years ago