@aurigma/ui-framework
Version:
A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.
180 lines (106 loc) • 3.55 kB
Markdown
# Interface: IInputTextConfig
Provides properties for an input field.
You can use these properties in **params** of the [AuWidgetInputText](../classes/auwidgetinputtext.md) class.
```
{
"widgets": [
{
"name": "quantity",
"title": "Quantity",
"type": "input-text",
"params": {
"defaultValue": "{{ order.quantity }}",
"placeholder": "Quantity",
"type": "number",
"min": "1"
}
}
]
}
```
## Hierarchy
* **IInputTextConfig**
## Index
### Properties
* [defaultValue](iinputtextconfig.md#optional-defaultvalue)
* [isNumber](iinputtextconfig.md#optional-isnumber)
* [isTextArea](iinputtextconfig.md#optional-istextarea)
* [label](iinputtextconfig.md#optional-label)
* [max](iinputtextconfig.md#optional-max)
* [maxLength](iinputtextconfig.md#optional-maxlength)
* [min](iinputtextconfig.md#optional-min)
* [onChange](iinputtextconfig.md#optional-onchange)
* [pattern](iinputtextconfig.md#optional-pattern)
* [patternFlags](iinputtextconfig.md#optional-patternflags)
* [placeholder](iinputtextconfig.md#optional-placeholder)
* [prompt](iinputtextconfig.md#optional-prompt)
* [rows](iinputtextconfig.md#optional-rows)
* [supportText](iinputtextconfig.md#optional-supporttext)
* [supportTextPosition](iinputtextconfig.md#supporttextposition)
* [type](iinputtextconfig.md#optional-type)
* [value](iinputtextconfig.md#optional-value)
## Properties
### `Optional` defaultValue
• **defaultValue**? : *string | number*
The default value of the widget, either a string or number. By default, this is an empty string.
___
### `Optional` isNumber
• **isNumber**? : *boolean*
___
### `Optional` isTextArea
• **isTextArea**? : *boolean*
If `true`, enables a text area instead of single-line text. The default value is `false`.
___
### `Optional` label
• **label**? : *string*
A label of the widget. By default, this is an empty string.
___
### `Optional` max
• **max**? : *number*
The max value for the `number` type. The default value is `999999`.
___
### `Optional` maxLength
• **maxLength**? : *number*
The max text length.
___
### `Optional` min
• **min**? : *number*
The min value for the `number` type. The default value is `-999999`.
___
### `Optional` onChange
• **onChange**? : *Function | Array‹Function›*
A function (`"{{#function <expression>}}"`) or an array of functions. This event triggers when the user changes the text in the widget.
___
### `Optional` pattern
• **pattern**? : *string*
A regular expression to limit input.
___
### `Optional` patternFlags
• **patternFlags**? : *string*
___
### `Optional` placeholder
• **placeholder**? : *string*
A string that is displayed as a hint. By default, this is an empty string.
___
### `Optional` prompt
• **prompt**? : *string*
_Deprecated, use [placeholder](iinputtextconfig.md#optional-placeholder) instead. By default, this is an empty string.
___
### `Optional` rows
• **rows**? : *number*
The widget height in rows if the text area mode is on. The default value is `2`.
___
### `Optional` supportText
• **supportText**? : *string*
An optional string. By default, this is an empty string.
___
### supportTextPosition
• **supportTextPosition**: *SupportTextPosition*
___
### `Optional` type
• **type**? : *string*
The widget type, either `"number"` or `"text"`. The default value is `"text"`.
___
### `Optional` value
• **value**? : *string | number*
The current value of the widget if it's used for entering text.