Search 71 components and 72 controllers by name, category or description.
Input
Native input with Laravel validation, masks, content selection on focus, accessible search clearing and opt-in auto-submit
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.
<hw:field name="email" label="Email">
<hw:input type="email" placeholder="name@example.com" autocomplete="email" />
</hw:field>
<hw:field name="password" label="Password">
<hw:input type="password" placeholder="••••••••" />
</hw:field>
<hw:field name="launch_date" label="Launch date">
<hw:input type="date" />
</hw:field>
<hw:field name="seats" label="Seats">
<hw:input type="number" min="1" max="50" value="8" />
</hw:field>
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.
<hw:field name="workspace" label="Workspace" description="Plain, editable field.">
<hw:input value="Acme Studio" />
</hw:field>
<hw:field name="workspace_slug" label="Slug" description="readonly still submits its value.">
<hw:input value="acme-studio" readonly />
</hw:field>
<hw:field name="legacy_id" label="Legacy ID" description="disabled is skipped by the browser on submit.">
<hw:input value="WS-00412" disabled />
</hw:field>
{{-- No round trip here: aria-invalid and the message are declared, not derived. --}}
<hw:field name="invalid_preview" label="Invalid" :error="false">
<hw:input value="not-an-email" aria-invalid="true" />
<hw:field.error messages="That does not look like a valid email address." />
</hw:field>
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.
{{-- Presets: cpf, cnpj, cpf-cnpj, phone-br, cep, date-br, time.
Anything else passes straight through to Maska. --}}
<hw:field name="document" label="CPF or CNPJ" description="cpf-cnpj switches mask on length.">
<hw:input mask="cpf-cnpj" placeholder="000.000.000-00" />
</hw:field>
<hw:field name="phone" label="Phone" description="phone-br grows from 8 to 9 digits.">
<hw:input mask="phone-br" placeholder="(11) 90000-0000" />
</hw:field>
<hw:field name="postcode" label="Postcode">
<hw:input mask="cep" placeholder="00000-000" />
</hw:field>
<hw:field name="licence" label="Raw Maska string" description="Unknown presets pass through verbatim.">
<hw:input mask="AAA-####" placeholder="ABC-1234" />
</hw:field>
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).
<hw:field name="search" label="Search with enhanced clearing" description="Clear with the button or Escape.">
<hw:input type="search" placeholder="Search projects…" value="redesign" />
</hw:field>
<hw:field name="native_search" label="Browser-native search" description="Opt out of enhanced clearing.">
<hw:input type="search" :clearable="false" placeholder="Search projects…" value="redesign" />
</hw:field>
<hw:field name="reference" label="Clearable text" description="Add a clear action to a regular text field.">
<hw:input clearable value="project-123" />
</hw:field>
<hw:field name="api_token" label="auto-select" description="Selects its content on focus (auto-select).">
<hw:input value="sk_live_51H8xQ2eZvKYlo2C" auto-select readonly />
</hw:field>
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.
— · Scope: —
clean-query-params drops empty fields from the URL.
{{-- auto-submit on the control needs auto-submit on an ancestor form.
Text inputs debounce by default; clearing a clearable field submits at once. --}}
<hw:form method="get" :action="route('components.input')" auto-submit auto-submit-delay="300" clean-query-params frame="input-auto-submit-results">
<div class="grid gap-4 sm:grid-cols-2">
<hw:field name="q" label="Debounced (600ms)">
<hw:input placeholder="Type to search…" clearable auto-submit auto-submit-delay="600" />
</hw:field>
<hw:field name="scope" label="Immediate">
<hw:input placeholder="Submits on every keystroke" auto-submit="immediate" />
</hw:field>
</div>
</hw:form>
<hw:frame id="input-auto-submit-results" class="mt-4 block rounded-lg border bg-muted/30 p-4 text-sm">
Query: <code>{{ request('q') ?: '—' }}</code> · Scope: <code>{{ request('scope') ?: '—' }}</code>
<p class="mt-1 text-muted-foreground">clean-query-params drops empty fields from the URL.</p>
</hw:frame>
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.
{{-- Brackets in, dot notation out: id="variables-0-name", errorKey="variables.0.name" --}}
<hw:input name="variables[0][name]" placeholder="variables[0][name]" />
{{-- error-key when the submitted name and the validation key genuinely differ --}}
<hw:input name="payload[email]" error-key="user.email" type="email" placeholder="payload[email]" />
{{-- Radios sharing a name get unique ids from their value: plan-free, plan-pro --}}
<div class="flex items-center gap-6 text-sm">
<label class="flex items-center gap-2">
<hw:input type="radio" name="plan" value="free" />
Free
</label>
<label class="flex items-center gap-2">
<hw:input type="radio" name="plan" value="pro" checked />
Pro
</label>
</div>