Input

Native input with Laravel validation, masks, content selection on focus, accessible search clearing and opt-in auto-submit

View documentation

Types

type passes straight through. Inside a hw:field the input inherits the name and derives its id, error key and old() value from it.

States

readonly still submits, disabled does not. The invalid example declares its own aria-invalid and message instead of going through the server — see Field for the real round trip.

Plain, editable field.

readonly still submits its value.

disabled is skipped by the browser on submit.

Masks

mask takes a preset (cpf, cnpj, cpf-cnpj, phone-br, cep, date-br, time) or any raw Maska string.

cpf-cnpj switches mask on length.

phone-br grows from 8 to 9 digits.

Unknown presets pass through verbatim.

Search, clearable and auto-select

type="search" includes enhanced clearing by default: use the clear button or Escape. Add clearable to other text fields, or use :clearable="false" for browser-native search clearing. auto-select selects a field's content on focus.

Clear with the button or Escape.

Opt out of enhanced clearing.

Add a clear action to a regular text field.

Selects its content on focus (auto-select).

auto-submit

Text inputs debounce by default; auto-submit="immediate" opts out. The control's auto-submit needs auto-submit on an ancestor form. Clearing a clearable field submits immediately so pending typing is cancelled.

Query: — · Scope: —

clean-query-params drops empty fields from the URL.

Name derivation

HTML brackets become dot notation for Laravel: variables[0][name] gives id variables-0-name and error key variables.0.name. Radios sharing a name get unique ids suffixed from their value.