Input Node

Inputs are common form controls that allow the user to enter text values using their keyboard. This node roughly corresponds to the HTML input and textarea elements.

You'll often find inputs in forms that prompt for open-ended information from the user.

Properties

Visible

PropinputNode.isVisible
Typeboolean
Default{{true}}

Whether or not this node is visible.

Enabled

PropinputNode.isEnabled
Typeboolean
Default{{true}}

Whether or not this node is enabled.

Tooltip

PropinputNode.tooltip
Typestring
Defaultundefined

The tooltip text to display when hovered or focused over this node.

Top

PropinputNode.top
Typestring
Default1

The position of the node from the top side of the grid (grid-row-start).

Left

PropinputNode.left
Typestring
Default1

The position of the node from the left side of the grid (grid-column-start).

Width

PropinputNode.width
Typestring
Default128px

The width of the node. When this node is in a grid layout, this should be done using unitless grid column units (specifying 4 will become grid-column-end: span 4). When this node is in a stack layout, the width must be specified using CSS units (e.g. 100px or 100%).

Min Width

PropinputNode.minWidth
Typestring
Defaultnone

The minimum width of the node. When this node is in a grid layout, this property is ignored.

Max Width

PropinputNode.maxWidth
Typestring
Defaultnone

The maximum width of the node. When this node is in a grid layout, this property is ignored.

Height

PropinputNode.height
Typestring
Default32px

The height of the node. When this node is in a grid layout, this should be done using unitless grid row units (specifying 4 will become grid-row-end: span 4). When this node is in a stack layout, the height must be specified using CSS units (e.g. 100px or 100%).

Min Height

PropinputNode.minHeight
Typestring
Defaultnone

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Max Height

PropinputNode.maxHeight
Typestring
Defaultnone

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Overflow

PropinputNode.overflow
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal and vertical axes for content that is larger than its container.

Overflow X

PropinputNode.overflowX
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal axis for content that is larger than its container.

Overflow Y

PropinputNode.overflowY
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the vertical axis for content that is larger than its container.

Custom Styles

PropinputNode.styles
Typestring
Defaultelement.styles { }

Custom CSS styles to be applied to the node. Use element.styles to refer to the current node.

Label

PropinputNode.label
Typestring
Defaultundefined

The label to be displayed alongside the input.

Field Name

PropinputNode.formFieldName
Typestring
Defaultundefined

Defines the key for this input in the body of the submitted form.

Label Style

PropinputNode.labelStyle
TypeLabelStyle ('left' | 'top' | 'hidden' | 'right')
Defaultleft

The display style of the label next to the input.

Type

PropinputNode.type
TypeHTMLInputType ('text' | 'email' | 'number' | 'password')
Defaulttext

The HTML type value for the input element.

Value

PropinputNode.value
Typestring
Defaultundefined

The current value of the input element.

Placeholder

PropinputNode.placeholder
Typestring
Defaultundefined

The placeholder value to display when no text has been entered.

Required

PropinputNode.isRequired
Typeboolean
Default{{false}}

Whether or not this input is required. This is a visual flag that updates the corresponding accessibility properties. It is up to the app developer to enforce the requirement.

Clearable

PropinputNode.isClearable
Typeboolean
Default{{false}}

Whether or not the input can be cleared.

Prefix

PropinputNode.prefix
Typestring
Defaultundefined

The text to display before the user's input text. This text will not be considered part of the value.

Suffix

PropinputNode.suffix
Typestring
Defaultundefined

The text to display after the user's input text. This text will not be considered part of the value.

Left Icon

PropinputNode.leftIcon
Typestring
Defaultundefined

The icon to display on the left side of the input control.

Right Icon

PropinputNode.rightIcon
Typestring
Defaultundefined

The icon to display on the right side of the input control.

Allow Multiple Lines

PropinputNode.allowMultipleLines
Typeboolean
Default{{false}}

Whether or not to allow multiple lines of input text. When true, a textarea HTML element will be used, as opposed to an input when set to false (the default).

Font Size

PropinputNode.fontSize
TypeFontSize ('xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl')
Defaultmd

The font size of the input text. This can either be CSS measurement values like 12px or theme tokens like md.

Text Align

PropinputNode.textAlign
TypeTextAlign ('left' | 'right' | 'center')
Defaultleft

The alignment of the text within the input element.

Event Handlers

On Focus

HandlerinputNode.onFocus

Called when the user focuses an input.

On Blur

HandlerinputNode.onBlur

Called when the input loses focus.