enterkeyhint

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package enterkeyhint defines the EnterKeyHint type and its predefined values.

Action label or icon hint for the enter key on virtual keyboards. Improves mobile user experience by providing context-appropriate keyboard actions and visual cues.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Enter Standard enter key behavior. Typically shows "Enter" or return arrow icon.
	// Default behavior for most text input without specific action context.
	Enter = EnterKeyHint("enter")

	// Done Indicates completion of input. Shows "Done" label and suggests finishing current
	// task. Common for forms and input completion scenarios.
	Done = EnterKeyHint("done")

	// Go Navigate to target or perform action. Shows "Go" label and suggests immediate
	// navigation or execution. Often used for search and URL inputs.
	Go = EnterKeyHint("go")

	// Next Move to next input field. Shows "Next" label and suggests progression to
	// the next form element. Useful for multi-field forms and step-by-step input.
	Next = EnterKeyHint("next")

	// Previous Move to previous input field. Shows "Previous" label and suggests returning
	// to the prior form element. Less common but useful for form navigation.
	Previous = EnterKeyHint("previous")

	// Search Perform search operation. Shows "Search" label or magnifying glass icon.
	// Specifically designed for search input fields and query submission.
	Search = EnterKeyHint("search")

	// Send Send message or submit data. Shows "Send" label and suggests immediate
	// transmission. Common for messaging interfaces and communication forms.
	Send = EnterKeyHint("send")
)

Variables for EnterKeyHint values

Functions

This section is empty.

Types

type EnterKeyHint

type EnterKeyHint []byte

EnterKeyHint is a typed value for the HTML enterkeyhint attribute.

Action label or icon hint for the enter key on virtual keyboards. Improves mobile user experience by providing context-appropriate keyboard actions and visual cues.

func Custom

func Custom(value string) EnterKeyHint

Custom allows setting a custom EnterKeyHint value for edge cases or future specifications. Use this when the predefined constants don't cover your specific use case.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL