inputtype

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Text Single-line text input field. Default input type for general text entry including
	// names, addresses, search terms, and freeform text content.
	Text = InputType("text")

	// Password Password input field with masked characters. Text is hidden from view for security
	// and password managers can provide auto-fill functionality.
	Password = InputType("password")

	// Email Email address input with built-in validation. Mobile devices show email keyboard
	// with @ symbol. Browser validates email format before form submission.
	Email = InputType("email")

	// Search Search input field with search-specific styling. May show clear button and
	// search-optimized virtual keyboard on mobile devices.
	Search = InputType("search")

	// Tel Telephone number input field. Mobile devices display numeric keypad with
	// phone-specific characters like +, *, and # for easier number entry.
	Tel = InputType("tel")

	// Url URL input with built-in validation and URL-optimized keyboard. Browser validates
	// URL format and mobile keyboards show .com shortcuts and forward slash.
	Url = InputType("url")

	// Number Numeric input field with increment/decrement controls. Supports min, max, step
	// attributes for value constraints and validation.
	Number = InputType("number")

	// Range Slider control for selecting numeric values within a range. Displays as horizontal
	// slider with draggable handle for intuitive value selection.
	Range = InputType("range")

	// Date Date picker input for selecting calendar dates. Shows native date picker widget
	// with calendar interface for intuitive date selection.
	Date = InputType("date")

	// Time Time picker input for selecting time values. Shows native time picker with
	// hour, minute, and optionally second selection interface.
	Time = InputType("time")

	// DatetimeLocal Combined date and time picker for local datetime values. Provides interface for
	// selecting both date and time without timezone information.
	DatetimeLocal = InputType("datetime-local")

	// Month Month picker input for selecting year and month combinations. Useful for
	// credit card expiry dates, report periods, and monthly selections.
	Month = InputType("month")

	// Week Week picker input for selecting specific weeks within a year. Displays week
	// numbers and allows selection of week-based date ranges.
	Week = InputType("week")

	// Checkbox Boolean checkbox input for binary choices. Users can check/uncheck for
	// yes/no options, agreements, preferences, and multi-select scenarios.
	Checkbox = InputType("checkbox")

	// Radio Radio button for exclusive single selection within groups. Multiple radio inputs
	// with same name create mutually exclusive option groups.
	Radio = InputType("radio")

	// File File upload input allowing users to select files from their device. Supports
	// multiple file selection and file type restrictions via accept attribute.
	File = InputType("file")

	// Submit Submit button that triggers form submission when clicked. Displays as button
	// with customizable text and submits form data to specified action URL.
	Submit = InputType("submit")

	// Button Generic button input without default behavior. Used with JavaScript for custom
	// actions, interactions, and dynamic functionality within forms.
	Button = InputType("button")

	// Reset Reset button that clears all form fields to their initial values. Restores
	// form to original state, undoing any user changes or entries.
	Reset = InputType("reset")

	// Hidden Hidden input field not displayed to users. Used for storing data, tokens,
	// IDs, or other values that need to be submitted with forms invisibly.
	Hidden = InputType("hidden")

	// Color Color picker input for selecting colors. Shows native color picker widget
	// allowing users to choose colors visually with preview and hex/RGB values.
	Color = InputType("color")

	// Image Image-based submit button using custom graphics. Functions like submit button
	// but displays specified image instead of standard button appearance.
	Image = InputType("image")
)

Variables for InputType values

Functions

This section is empty.

Types

type InputType

type InputType []byte

InputType Input control type determining appearance, behavior, and validation. Fundamentally changes how users interact with the input and what data format is expected.

func Custom

func Custom(value string) InputType

Custom allows setting a custom InputType 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