Beagle v1.5 is no longer actively maintained. The documented version you are viewing may contain deprecated functionality. For up-to-date documentation, see the latest version .
Input is a component that displays an editable text area for the user. These text fields are used to collect inputs that the user insert using the keyboard.
See how the structure is represented by the attributes below:
Attribute | Type | Required | Definition |
---|---|---|---|
value | String or Binding | ✓ | Item referring to the input value that will be entered in the editable text area of the Text Input component. |
placeholder | String or Binding | The Placeholder is a text that is displayed when nothing has been entered in the editable text field. | |
disabled | Boolean | Enables or disables the field. | |
readOnly | Boolean | Check if the Input will be editable or read only. | |
hidden | Boolean | Enables the component to be visible or not. | |
type | TextInputType or Binding | This attribute identifies the text type that it will receive in the editable field area. On Android and iOS, this field also attributes the type of keyboard that will be shown to the user. | |
styleId | String | This attribute receives a key that is registered in the Design System of each platform that customizes the component. | |
onChange | List <Action> | Actions array that this field can trigger when its value is altered. It
is possible to define a customized action or
any available action in the interface, for example, an action that shows
an Alert message. This attribute is optional, but if an action is defined here it needs to be configured in the fronted. | |
onBlur | List <Action> | Action array that this field can trigger when its focus is removed. It is possible to defined a customized action or any available action in the interface, for example, an action that shows an alert message (Alert). This attribute is optional, but if an action is defined here it needs to be configured in the fronted. | |
onFocus | List <Action> | Actions array that this field can trigger when this field is on focus. It is possible to defined a customized action or any available action in the interface, for example, an action that shows an alert message (Alert). This attribute is optional, but if an action is defined here it needs to be configured in the fronted. |
It is an ENUM
responsible to define which type of text input.
Type | Definition |
---|---|
DATE | Data input is a date. |
Data input is an email. | |
PASSWORD | Data input is a password. |
NUMBER | Data input only with numbers. |
TEXT | Data input is a text. |
See below an example of text input with the password type:
TextInput(
value = "my value",
placeholder = "password",
type = TextInputType.PASSWORD,
styleId = "test.input.style",
onChange = listOf(
Alert(
message = "Text value changed."
)
)
)
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.