yr.text_input

text_input(
    message: str | None = None,
) → str

Prompt the user for free-form text input.

Parameters

message
type: str | None = None

Optional label shown alongside the input field.

Returns

type: str

The text the user submitted.

Examples

Ask the user to enter a value:

python
import yera as yr

name = yr.text_input("What is your name?")
yr.markdown(f"Hello, **{name}**!")