text-input
Overview
text-input allows a user to type information in a text field.
Basic Example
<var name="job_name" type="text"/>
<text-input label="Job name" bind="job_name" required="true" />
Standard Attributes
bind
bindbindlabel
labellabelrequired
requiredrequiredAdvanced Attributes
align-content
align-contentalign-contentalign-label
align-labelalign-labelclear-button-visibility
clear-button-visibilityclear-button-visibilitydisabled
disableddisableddisplay
displayOptional
Type: string (static text, a format string or the return value of a JS/TS function)
Default: unset
Override what is displayed in the text-input when the user is not editing its content.
<text-input bind="weight" label="Total weight" display="{weight} pounds"/>
enable-number-scrolling
enable-number-scrollingOptional
Type: boolean
Default: false
Specify whether a text-input that is bound to a number field/variable should increase and decrease the number value when a user scrolls over the input using a mouse.
Note: Prior to runtime version 4.84.0, number values will always increase/decrease with mouse scrolling in the text-input component.
error-message
error-messageerror-messageid
ididlabel-case
label-caselabel-caselabel-color
label-colorlabel-colormodifier-text
modifier-textmodifier-texton-change
on-changeon-changeparagraph-resize-mode
paragraph-resize-modeOptional
Type: auto | manual | none
Default: manual
Specify in what way paragraph text inputs should be resizable. This attribute is only applied if the bind field is of type text:paragraph.
auto: The input will automatically resize to fit the text, limited by theheightattributes below.manual: The user is in control of the height of the input (not available on mobile devices).none: No resizing will occur, will only use theheightattributes below.
paragraph-height-min
paragraph-height-minOptional
Type: number
Default: 50
Specify the minimum height of the text-input. This attribute is only applied if the bind field is of type text:paragraph.
paragraph-height-max
paragraph-height-maxOptional
Type: number
Default: null (no limit)
Specify the maximum height of the text-input. This attribute is only applied if the bind field is of type text:paragraph.
paragraph-height
paragraph-heightType: number
Default: null (no limit)
Shorthand to set both paragraph-height-min and paragraph-height-max. Overridden if the these two attributes are also present. This attribute is only applied if the bind field is of type text:paragraph.
placeholder
placeholderplaceholderrequired
requiredrequiredshow-if and hide-if
show-ifhide-ifshow-if and hide-iftext-direction
text-directionOptional
Type: left-to-right | right-to-left
Default: left-to-right
Specify the direction of text entry into the component.
Component Methods
The following component methods are available when an id is assigned to the component and component.textInput({id:'my-id'}) is called from JS/TS:
clear
clearProgrammatically clear a value entered into the text-input.
focus
focusProgrammatically focus the text-input to allow the user to enter a value.
function focus(){
component.textInput({id: 'my-id'}).focus();
}scrollIntoView
scrollIntoViewProgrammatically scroll until the text-input is visible in the view.
Last updated
