diff --git a/content/en/api/components/ui/textinput.md b/content/en/api/components/ui/textinput.md index 50957f83c..bc1c215dc 100644 --- a/content/en/api/components/ui/textinput.md +++ b/content/en/api/components/ui/textinput.md @@ -8,142 +8,24 @@ description: Text Input component description and its attributes ## What is it? -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. +The Text Input is a component that displays an editable text area for the user. These text inputs are used to collect data inputs from users using a keyboard. -{{% alert color="danger" %}} -The `hidden` attribute has been deprecated in Beagle version 1.6.0 and will be removed in a future version. Use the `display` attribute of the` style` property instead. -{{% /alert %}} +This component has the following attributes: -See how the structure is represented by the attributes below: +|Attribute|Type|Required|Definition| +|:-----|:-----|:-----:|:-----| +|value|String or [Binding]({{< ref path="/api/context#bindings" lang="en" >}})|✓|Item referring to the input value that will be entered in the Text Input component editable text field area.| +|placeholder|String or [Binding]({{< ref path="/api/context#bindings" lang="en" >}})||The Placeholder is a text that is displayed when nothing has been entered in the editable text field.| +|enabled|Boolean||Enables or disables a text field| +|readOnly|Boolean||Set the text field to be read only when set to `true`.| +|type|TextInputType or [Binding]({{< ref path="/api/context#bindings" lang="en" >}})||This attribute identifies the text type that it will feed the text field area. On Android and iOS, this field also attributes the type of keyboard that will shown.| +|styleId|String||This attribute sets a String key to map this component in a Design System on the front end and set an style to it.| +|error|String or [Binding]({{< ref path="/api/context#bindings" lang="en" >}})||This attribute defines the TextInput error message.| +|showError|Boolean or [Binding]({{< ref path="/api/context#bindings" lang="en" >}})||Enables the error message to be visible when set to `true`.| +|onFocus|List<Action>||Sets a List of [Actions]({{< ref path="/api/actions" lang="en" >}}) that are triggered when the text field **gains focus**| +|onChange|List<Action>||Sets a List of [Actions]({{< ref path="/api/actions" lang="en" >}}) that are triggered when the text field **value changes**| +|onBlur|List<Action>||Sets a List of [Actions]({{< ref path="/api/actions" lang="en" >}}) that are triggered when the text field **looses focus**| -
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. The `hidden` attribute has been deprecated in Beagle version 1.6.0 and will be removed in a future version. Use the `display` attribute of the` style` property instead. | -
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. | -
error | -
- String or -Binding<b></b> - |
- - | This attribute shows if the TextInput has an error. | -
showError | -
- Boolean or -Binding<b></b> - |
-
- - | Enables the error string to be visible or not. | -
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. - | -
Atributo - | -Tipo - | -Obrigatório | -Definição - | -
---|---|---|---|
value | -- String ou - Binding - | -- | Item referente ao valor de entrada que será digitado na área - de texto editável do componente Text Input. | -
placeholder | -- String ou - Binding - | -- | Texto que é exibido quando nada foi inserido no campo de texto editável. | -
disabled | -Boolean | -- | Propriedade para habilitar ou desabilitar o campo. | -
readOnly | -Boolean | -- | Propriedade para determinar se o campo será editável ou somente - leitura. | -
hidden | -Boolean | -- | Propriedade que determina se o campo será escondido. O atributo `hidden` foi depreciado na versão 1.6.0 do Beagle e será removido em uma versão futura. Utilize o atributo `display` da propriedade `style` em seu lugar. | -
type | -TextInputType ou Binding | -- | Esse atributo identifica o tipo de texto que iremos receber na área - de texto editável. No Android e no iOS, esse campo também atribui - o tipo de teclado que será exibido pro usuário. | -
styleId | -String | -- | Recebe uma chave que é registrada no Design System de cada plataforma - para fazer customização no componente. | -
error | -
- String ou -<b></b>Binding<b></b> - |
- - | Esse atributo mostra se o TextInput possui um erro de acordo com uma entrada. | -
showError | -
- Boolean ou -<b></b>Binding<b></b> - |
-
- - | Propriedade que identifica se o a String de erro deve ser escondida ou não. | -
onChange | -List <Action> | -- | - Array de ações que esse campo pode disparar quando seu valor for alterado. - É possível definir uma ação customizada ou - qualquer ação já disponível na interface, como por - exemplo uma ação que mostra uma mensagem de alerta(Alert). - Este atributo é opcional, mas se uma ação for definida - aqui ela precisa estar configurada no frontend. - | -
onBlur | -List <Action> | -- | - Array de ações que esse campo pode disparar quando seu foco é retirado. - É possível definir uma ação customizada ou - qualquer ação já disponível na interface como, por - exemplo, uma ação que mostra uma mensagem de alerta(Alert). - Este atributo é opcional, mas se uma ação for definida - aqui ela precisa estar configurada no frontend. - | -
onFocus | -List <Action> | -- | - Array de ações que esse campo pode disparar quando é colocado - em foco. É possível definir uma ação customizada ou - qualquer ação já disponível na interface como, por exemplo, uma ação que mostra uma mensagem de alerta(Alert). - Este atributo é opcional, mas se uma ação for definida - aqui ela precisa estar configurada no frontend. - | -