Component used for multiline input purposes in forms.
Usage
import { MultilineTextField } from 'nr1'
Examples
Basic
<MultilineTextField label="Summary" placeholder="Enter a short description" />
With inline label
<MultilineTextField label="Summary" labelInline placeholder="Enter a short description"/>
Preformatted
<MultilineTextField type={MultilineTextField.TYPE.PREFORMATTED} label="Build command" placeholder="npm run build"/>
Loading
<MultilineTextField loading placeholder="Enter a short description" />
Disabled
<MultilineTextField disabled placeholder="Enter a short description" />
Read only
<MultilineTextField readOnly defaultValue="Some value" placeholder="Enter a short description"/>
With description
<MultilineTextField description="Description value" placeholder="Enter a short description"/>
With invalid message
<MultilineTextField invalid="Not enough text, needs more" placeholder="Enter a short description"/>
Props
string | Provide a label for screen readers to describe this input. This is only required if the screen reader label should be different to the |
string | Provide the unique |
boolean | If |
string | Appends class names to the component.Should be used only for positioning and spacing purposes. |
string | Default value of the multiline text field. |
string | Message with instructions on how to fill the form field. |
boolean | Establishes whether the field can be editable or not. |
string | Additional information can be displayed in an info tooltip next to the Label. |
boolean|string | When true, sets the field in an invalid state, in order to notify the user attention is needed over this particular field. This property can be a |
string | Text to display as label. |
boolean | Display the label inline the form control.Use only when the component is not inside a |
boolean | If loading a list of data or something else into a form field, indicate to the user that something is loading by using the loading state form.Used to inform that the field might load values dynamically. When set to |
function | Callback which is fired when the multiline text field loses focus. function ( |
function | Callback which is fired when the multiline text field value changes. function ( |
function | Callback which is fired when the multiline text field gets focus. function ( |
function | Callback which is fired when a key is pressed. function ( |
function | Callback which is fired when a key is released. function ( |
string | Hint displayed in the multiline text field when it has no value. |
boolean | If |
boolean | If |
number | Amount of rows in the text field.The minimum required is five rows. |
enum[] | Spacing property. Spacing is defined as a tuple of zero to four values, which follow the same conventions as CSS properties like <Array of |
boolean | If |
object | Inline style for custom styling.Should be used only for positioning and spacing purposes. |
string | Adds a Note: You might not see |
enum |
|
string | Value of the multiline text field.This is required for a controlled component. |