express.ui.input_text
express.ui.input_text(id,
label,='',
value*,
=None,
width=None,
placeholder='off',
autocomplete=None,
spellcheck )
Create an input control for entry of text values.
Parameters
id : str
-
An input id.
label : TagChild
-
An input label.
value : str = ''
-
Initial value.
width : Optional[str] = None
-
The CSS width, e.g., ‘400px’, or ‘100%’.
placeholder : Optional[str] = None
-
A hint as to what can be entered into the control.
autocomplete : Optional[str] = 'off'
-
Whether to enable browser autocompletion of the text input. If
None
, then it will use the browser’s default behavior. Some values include “on”, “off”, “name”, “username”, and “email”. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete to learn more aboutautocomplete
’s supported values. spellcheck : Optional[Literal[‘true’, ‘false’]] = None
-
Whether to enable browser spell checking of the text input (default is
None
). If None, then it will use the browser’s default behavior.
Returns
: Tag
-
A UI element
Notes
Server value
A string containing the current text input. The default value is ""
unless value
is provided.
See Also
Examples
#| standalone: true
#| components: [editor, viewer]
#| layout: vertical
#| viewerHeight: 400
## file: app.py
from shiny.express import input, render, ui
ui.input_text("caption", "Caption:", "Data summary")
@render.code
def value():
return input.caption()