functions

TextInput
Edited: Sunday 25 January 2026

TextInput

Category: Components
File: form.go
Package: ui

Signature

1func TextInput(editor *widget.Editor, hint string) W

Description

TextInput creates a bordered text input field with optional hint text.
The hint appears when the field is empty, guiding user input.

Example:

editor := &widget.Editor{SingleLine: true}
input := TextInput(editor, "Enter your name...")

The editor’s state is managed by the provided widget.Editor pointer.

Examples

TextInput

1{
2	editor := LineEditor()
3	_ = TextInput(&editor, "Enter your name...")
4}

Example Output


This documentation is auto-generated. To update, run make docs

Backlinks