ui.Textbox
A textbox that enables the user to input text information.
Usage | Returns |
---|
ui.Textbox(placeholder, value, onChange, disabled, style) | ui.Textbox |
Argument | Type | Details |
---|
placeholder | String, optional | The placeholder text to display when the textbox is empty. Defaults to none. |
value | String, optional | The textbox's value. Defaults to none. |
onChange | Function, optional | The callback to fire when the text changes. The callback is passed the text currently in the textbox and the textbox widget. |
disabled | Boolean, optional | Whether the textbox is disabled. Defaults to false. |
style | Object, optional | An object of allowed CSS styles with their values to be set for this widget. See style() documentation. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["The `ui.Textbox` widget creates an interactive textbox for user text input."],["It can be customized using arguments like `placeholder`, `value`, `onChange`, `disabled`, and `style`."],["The `onChange` callback provides the current text and the textbox widget, enabling dynamic responses to user input."],["Users can set an initial value and placeholder text, and optionally disable the textbox using the provided arguments."]]],["The core functionality is a text input box (`ui.Textbox`). Users can set a `placeholder` text and the initial `value`. An `onChange` callback function is triggered whenever the text changes, receiving the new text and widget. Users can disable the textbox with the `disabled` parameter. Customizable `style` options are available using CSS styles, allowing for visual modification. All arguments are optional with default values, except for the callback function.\n"]]