Search 71 components and 72 controllers by name, category or description.
Textarea
Textarea with optional auto-resize, character counter, validation and auto-submit
auto-resize
Same auto-derivation, old() merge and ARIA wiring as hw:input. auto-resize grows the box as the content changes and shrinks it back when text is deleted.
Grows as you type.
Plain textarea, no controllers.
{{-- auto-resize grows and shrinks the box as the content changes. --}}
<hw:field name="bio" label="Bio" description="Grows as you type.">
<hw:textarea
value="Write a short profile for your team."
auto-resize
rows="2"
/>
</hw:field>
<hw:field name="notes" label="Fixed height" description="Plain textarea, no controllers.">
<hw:textarea rows="4" placeholder="Anything else we should know?" />
</hw:field>
Character counter
:counter places a live counter inside the control's frame and sets maxlength. countdown shows remaining characters instead of characters used.
{{-- :counter enables char-counter and sets maxlength in one prop. --}}
<hw:field name="summary" label="Characters used">
<hw:textarea :counter="120" auto-resize placeholder="Counts up to 120." />
</hw:field>
{{-- countdown flips the readout to characters remaining. --}}
<hw:field name="tweet" label="Characters remaining">
<hw:textarea :counter="280" countdown auto-resize placeholder="Counts down from 280." />
</hw:field>
Custom counter markup
The counter-slot slot replaces the default readout — not counter, which is the prop name and would land its markup in maxlength. Keep data-char-counter-target="counter" on the element the controller should write into.
{{-- The slot is counter-slot, not counter: a slot named counter would overwrite
the :counter prop and land its markup in maxlength. Keep the target attribute —
the controller writes into whatever carries data-char-counter-target="counter". --}}
<hw:field name="release_notes" label="Release notes">
<hw:textarea :counter="500" countdown auto-resize rows="3" placeholder="What shipped?">
<x-slot:counter-slot>
<span class="flex items-center gap-1.5 text-xs text-muted-foreground">
<x-lucide-pencil-line class="size-3.5" />
<span data-char-counter-target="counter"></span> left
</span>
</x-slot:counter-slot>
</hw:textarea>
</hw:field>
auto-submit
Textareas debounce like text inputs. The control's delay overrides the form-level one.
—{{-- Textareas debounce by default, like text inputs. --}}
<hw:form method="get" :action="route('components.textarea')" auto-submit auto-submit-delay="300" clean-query-params frame="textarea-auto-submit-results">
<hw:field name="draft" label="Draft">
<hw:textarea auto-resize rows="2" auto-submit auto-submit-delay="800" placeholder="Stops typing for 800ms, then submits." />
</hw:field>
</hw:form>
<hw:frame id="textarea-auto-submit-results" class="mt-4 block rounded-lg border bg-muted/30 p-4 text-sm">
Last submitted draft: <code>{{ request('draft') ?: '—' }}</code>
</hw:frame>