Text#
- class marimo.ui.text(value: str = '', placeholder: str = '', kind: Literal['text', 'password', 'email', 'url'] = 'text', *, label: str = '', on_change: Callable[[str], None] | None = None)#
A text input.
Example.
text = mo.ui.text(value="Hello, World!")
Attributes.
value: a string of the input’s contents
Initialization Args.
value: default value of text boxplaceholder: placeholder text to display when the text area is emptykind: input kind, one of"text","password","email", or"url"defaults to"text"label: text label for the elementon_change: optional callback to run when this element’s value changes
Public methods
Inherited from
UIElementform([label])Create a submittable form out of this
UIElement.Inherited from
Htmlbatch(**elements)Convert an HTML object with templated text into a UI element.
center()Center an item.
right()Right-justify.
left()Left-justify.
callout([kind])Create a callout containing this HTML element.
Public Data Attributes:
Inherited from
UIElementvalueThe element’s current value.
Inherited from
HtmltextA string of HTML representing this element.