Passwordinput

PasswordInput widget

The PasswordInput Widget enables the rendering of secure password input fields, ensuring that user-entered passwords remain hidden and protected within your application for enhanced security and privacy.

Test in Kitchen Sink (opens in a new tab)

Properties

PropertyTypeDescription
idstringID to be referenced later
maxWidthintegerThe max width of this Input widget (default 700)
labelstringLabel for your widget
labelHintstringHint text on your label
hintTextstringHint text explaining your widget
requiredbooleanWhether the field is required
enabledbooleanEnables or disables the interactivity and input functionality of the widget
iconobjectSee properties
onChangeCall Ensemble's built-in functions or execute code when the input changes. Note for free-form text input, this event only dispatches if the text changes AND the focus is lost (e.g. clicking on button)
onFocusReceivedactionExecute an Ensemble action when the field receives focus
onFocusLostactionExecute an Ensemble action when the field loses focus
stylesobjectSee properties
validatorobjectSee properties
onKeyPressactionOn every keystroke, call Ensemble's built-in functions or execute code
keyboardActionstringSpecify the action key on native device's soft keyboard
obscureTogglebooleanenable the toggling between plain and obscure text.
readOnlybooleanWhen it is true, the text cannot be modified by any shortcut or keyboard operation.
selectablebooleanSetting this to true will enable features such as long-pressing the TextField to select text and show the cut/copy/paste menu, and tapping to move the text caret text.

icon

PropertyTypeDescription
namestringThe name of the icon
librarystringWhich icon library to use.
colorinteger or stringThe color specification for the text, which can be represented in different formats. It can be specified as a number, a predefined color name, or a hexadecimal value starting with '0x'. transparent black blue white red grey teal amber pink purple yellow green brown cyan indigo lime orange
sizeintegerDefines the dimensions or magnitude of an element, allowing control over its overall size within the layout.

styles

PropertyTypeDescription
expandedbooleanIf the parent is a Row or Column, this flag will stretch this widget in the appropriate direction. (e.g stretch horizontally for parent of type Row)
contentPaddinginteger or stringPadding around your input content with CSS-style notation e.g. margin: 5 20 5
fillColorinteger or stringThe fill color for this input fields. This property can be defined in the theme to apply to all Input widgets, starting with '0xFF' for full opacity. transparent black blue white red grey teal amber pink purple yellow green brown cyan indigo lime orange
borderRadiusintegerThe border radius for this Input widget. This property can be defined in the theme to apply to all Input widgets.
borderWidthintegerThe border width for this Input widget. This property can be defined in the theme to apply to all Input widgets.
borderColorinteger or stringSets the border color, starting with '0xFF' for full opacity. transparent black blue white red grey teal amber pink purple yellow green brown cyan indigo lime orange
errorBorderColorinteger or stringThe border color when there are errors on this input field. This property can be defined in the theme to apply to all Input widgets, starting with '0xFF' for full opacity. transparent black blue white red grey teal amber pink purple yellow green brown cyan indigo lime orange
focusedBorderColorinteger or stringThe border color when this input field is receiving focus. This property can be defined in the theme to apply to all Input widgets, starting with '0xFF' for full opacity. transparent black blue white red grey teal amber pink purple yellow green brown cyan indigo lime orange
focusedErrorBorderColorinteger or stringThe border color of this input field when it is receiving focus in its error state. This property can be defined in the theme to apply to all Input widgets, starting with '0xFF' for full opacity. transparent black blue white red grey teal amber pink purple yellow green brown cyan indigo lime orange
disabledBorderColorinteger or stringThe border color when this input field is disabled. This property can be defined in the theme to apply to all Input widgets, starting with '0xFF' for full opacity. transparent black blue white red grey teal amber pink purple yellow green brown cyan indigo lime orange
variantstringSelect a pre-defined look and feel for this Input widget. This property can be defined in the theme to apply to all Input widgets. see properties
visiblebooleanToggle a widget visibility on/off. Note that an invisible widget will not occupy UI space, unless the visibilityTransitionDuration is specified.
visibilityTransitionDurationnumberSpecify the duration in seconds when a widget animates between visible and not visible state. Note that setting this value will cause the widget to still occupy the UI space even when it is not visible.
stackPositionTopintegerThe distance of the child's top edge from the top of the stack. This is applicable only for Stack's children.
stackPositionBottomintegerThe distance that the child's bottom edge from the bottom of the stack. This is applicable only for Stack's children.
stackPositionLeftintegerThe distance that the child's left edge from the left of the stack. This is applicable only for Stack's children.
stackPositionRightintegerThe distance that the child's right edge from the right of the stack. This is applicable only for Stack's children.
alignmentstringThe alignment of the widget relative to its parent. topLeft, topCenter, topRight, centerLeft, center, centerRight, bottomLeft, bottomCenter, bottomRight
elevationintegerThe z-coordinate at which to place this material relative to its parent. A non-zero value will show a shadow, with its size relative to the elevation value. Minimum value: 0, Maximum value: 24
elevationShadowColorinteger or stringThe shadow color for the elevation, which can be represented in different formats. It can be specified as a number, a predefined color name, or a hexadecimal value starting with '0x'. transparent black blue white red grey teal amber pink purple yellow green brown cyan indigo lime orange
elevationBorderRadiusstring or integerThe border radius of the widget.This can be specified using CSS-like notation with 1 to 4 integers. Minimum value: 0.
captureWebPointerbooleanApplicable for Web only. When overlaying widgets on top of certain HTML container (e.g. Maps), the mouse click is captured by the HTML container, causing issue interacting with the widget. Use this to capture and maintain the mouse pointer on your widget.
fontSizeintegerSets the size of the text.

validator

PropertyTypeDescription
minLengthintegerThe minimum number of characters
maxLengthintegerThe maximum number of characters
regexstringThe Regular Expression the input will need to match
regexErrorstringThe customized error message to show when the input does not match the provided regex.

options for styles.variant

OptionDescription
boxdraw a Box border around this input widget. This property can be defined in the theme to apply to all Input widgets.
underlinedraw an Underline below this input widget. This property can be defined in the theme to apply to all Input widgets.