TextArea
The TextArea
component can be used as a multi-line plain-text editing control
to enter free-form text, such as a comment on a form.
TextAreaProps
Signature:
export declare type TextAreaProps = <, (value: , event: <>) => | > & & & & & & {
placeholder?: ;
/**
* This attribute indicates whether the textarea is resizable by the user, and, if so, in which direction.
* @defaultValue
*/
resize?: | | | ;
/**
* The visible width of the text control, in average character widths.
* If it is specified, it must be a positive integer.
* @defaultValue 20
*/
cols?: ;
/**
* The of visible text lines for the control. If it is specified, it must be a positive integer.
* @defaultValue 2
*/
rows?: ;
/**
* The minimum of characters required that the user should enter.
* Doesn't stop the user from removing characters so that the entered goes past the minimum,
* but it does make the value entered into the <textarea> invalid.
* With a set minlength an empty <textarea> is still considered valid unless you also have the required attribute set.
*/
minLength?: ;
/**
* The maximum of characters that the user can enter. If this value isn't specified,
* the user can enter an unlimited of characters.
*/
maxLength?: ;
/**
* This attribute indicates whether the value of the control can be automatically completed by the browser.
* If no autocompletion is desired, it can be set to .
*/
autoComplete?: ;
/** The name of the control - used when submitting the textarea in a form. */
width?: ;
};
TextAreaBaseProps
Name | Type | Default | Description |
---|---|---|---|
placeholder? | - | ||
resize? | | | | | 'both' | This attribute indicates whether the textarea is resizable by the user, and, if so, in which direction. |
cols? | 20 | The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. | |
rows? | 2 | The number of visible text lines for the control. If it is specified, it must be a positive integer. | |
minLength? | - | The minimum number of characters required that the user should enter. Doesn't stop the user from removing characters so that the number entered goes past the minimum, but it does make the value entered into the <textarea> invalid. With a set minlength an empty <textarea> is still considered valid unless you also have the required attribute set. | |
maxLength? | - | The maximum number of characters that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters. | |
autoComplete? | - | This attribute indicates whether the value of the control can be automatically completed by the browser. If no autocompletion is desired, it can be set to "off". | |
width? | - | The name of the control - used when submitting the textarea in a form. |
TextAreaControlledProps
Name | Type | Default | Description |
---|---|---|---|
value | - | The current value of the textarea. | |
onChange | (value: , event: <>) => | - | Handler that is called when the value changes. |
TextAreaUncontrolledProps
Name | Type | Default | Description |
---|---|---|---|
defaultValue? | - | The default value of the textarea. |