Textbox

Textbox component for Universal Apps

A textbox lets users enter and edit text.

Textbox

Password Textbox

A password textbox will mask the input.

Multiline

You can create a multiline textbox by using the -Multiline parameter. Pressing enter will add a new line. You can define the number of rows and the max number of rows using -Rows and -RowsMax.

Interaction

Retrieving a textbox value

You can use Get-UDElement to get the value of a textbox

Setting the textbox value

Icons

You can set the icon of a textbox by using the -Icon parameter and the New-UDIcon cmdlet.

Mask

The textbox mask is accomplished using react-imask. You can specify RegEx and pattern matching.

This example creates a mask for US based phone numbers.

Unmasking

The default behavior of -Mask is to return the masked value in forms and Get-UDElement. You can return the unmasked value by specifying the -Unmask parameter.

OnEnter

The -OnEnter event handler is executed when the user presses enter in the text field. It is useful for performing other actions, like clicking a button, on enter.

OnBlur

The -OnBlur event handler is executed when the textbox loses focus.

OnValidate

Use the -OnValidate event handler to validate input typed in the textbox.

API

New-UDTextbox

Last updated

Was this helpful?