Textarea
Multi-line text input for longer form responses.
<.textarea name="message" />
Label
Add clear labels and optional sublabels to textareas for context.
Add a comment
<.textarea name="message" label="Message" sublabel="Add a comment" />
Help text
Provide additional guidance below textareas with help text.
At least 100 characters
<.textarea name="textarea" label="Message" help_text="At least 100 characters" />
Disabled
Show textareas in a disabled state for non-editable fields.
<.textarea name="textarea" label="Message" disabled />
Error
Display validation feedback with error states for textareas.
At least 100 characters
<.form :let={f} for={to_form(%{"message" => ""}, errors: [message: {"At least 100 characters", []}])}>
<.textarea field={f[:message]} label="Message" placeholder="Add a comment" />
</.form>
<.textarea name="textarea" label="Message" errors={["At least 100 characters"]} />