Native text input properties

This element goal is to draw and use native input allowing user to enter text using native virtual keyboard if available.

Properties

Style properties

Input will reuse a lot of style properties of other component. Please refer to relative page.

See Common properties for :

  • x
  • y
  • width
  • height
  • layer

Caution

There is no isAuto_width nor isAuto_height

See Border properties for :

  • borderWidth
  • borderRadius
  • borderColor

Caution

Border properties are only supported for fallback on native input

See Rendered properties for :

  • opacity
  • scale
  • scaleX
  • scaleY
  • rotate
  • transformOriginX
  • transformOriginY

See Text primitive for

  • align
  • color
  • family
  • size

See Rectangle primitive for :

  • fillColor

Caution

fillColor property is only supported for fallback on native input

Specific to input:

  • placeholder
  • placeholderColor

placeholder

TypeDefault valueSupported value
stringβ€œβ€œNot applicable

Specifies a short hint that describes the expected value of an input field (e.g. a sample value or a short description of the expected format). The short hint is displayed in the input field before the user enters a value. Once a value set, we do not see placeholder anymore.

placeholderColor

TypeDefault valueSupported value
stringβ€œ#757575β€œNot applicable

Describes the color of the placeholder using format defined in theme.

Element properties

  • keyboardType

keyboardType

TypeDefault valueSupported value
string$VirtualKeyboardType.ALPHANUMERIC
  • $VirtualKeyboardType.ALPHANUMERIC
  • $VirtualKeyboardType.ALPHANUMERIC_NO_HINT
  • $VirtualKeyboardType.NUMERIC
  • $VirtualKeyboardType.MAIL
  • $VirtualKeyboardType.PASSWORD

Specifies the type of input that will mainly impact the relative displayed keyboard.

Caution

Type is immutable. You should set one one the creation that you won’t be able to change.

Getter / setter

setValue β†’ {Promise}

Define a value for the input.

Returns

Promise that resolve is set has been successful.

getValue β†’ {Promise< String >}

Get the current value of the input.

Returns

Promise that resolve within a string representing the current value of the input.

Events

onVirtualKeyboardHide(value)

Triggers each time virtual keyboard focus is lost and keyboard is hidden.

Send input value.

onValueChanged(value)

Triggers each time input value changed.

Send input value.