Textarea
Multi-line text field with sizes and content-aware auto-grow.
Basic
Label, sublabel, description, help text
label, sublabel, description, and help_text render the field's labelling without extra wrappers.
Summarize what changed in this release for end users.
Sizes
Set size to one of sm, md, lg, or xl to match the surrounding density.
Initial height
Set rows to control the initial visible line count. The native resize handle still works.
Auto-grow
Add autogrow with min_rows and max_rows so the field expands and shrinks with its contents. Pure CSS, no JavaScript or layout shift.
Chat composer
Start at one row and expand up to ten with autogrow, then forward Enter to a LiveView event with phx-keydown and phx-key.
Disabled
Required field
Pair the native required attribute with a sublabel hint so the requirement is visible in the label.
Character limit
maxlength caps input at the browser level; help_text surfaces the cap in the field.
Errors
Pass an errors list to render the field in the danger color with messages below. When bound to a field, errors flow from the changeset automatically.
Description must be at least 10 characters.
Form integration
Bind to a Phoenix.HTML.FormField with field={f[:name]}. The component derives id, name, value, and errors from the struct.
Constrained width
By default the field fills its container. To narrow only the field while keeping the label area at its natural width, target [data-part=field-root] on any ancestor.
Goes to the product team. Anonymous unless you sign in.