Multi-line text field: outlined, filled or plain, fixed or resizable, with a live
character counter, autogrow, {{token}} highlighting and optional header/footer bars.
<.textarea field={@form[:bio]} label="Bio" variant="filled" resizable />
<.textarea name="note" maxlength={200} counter autogrow max_rows={8} />
<.textarea name="why" counter min_length={20} counter_format="%{count} de %{max}" />
<.textarea name="msg" tokens value="A fatura {{fatura.numero}} esta atrasada." />
<.textarea name="post" rows={5}>
<:header><span class="lu-xs lu-muted">Variaveis</span></:header>
<:footer><span>toolbar</span></:footer>
</.textarea>With counter, maxlength is a soft limit: the counter warns from 90% and turns red past it,
and the browser does not refuse the characters (validate on the server).
The counter (counter), autogrow and tokens run in the LedgerUI.Textarea hook, which
needs a stable id (it comes from field, or name). The counter updates while typing, without
the server. A plain textarea needs no hook.
Summary
Functions
Renders a <textarea> inside the lu-ta frame, with its caption, help and errors.
Functions
Renders a <textarea> inside the lu-ta frame, with its caption, help and errors.
Attributes
field(Phoenix.HTML.FormField) - Defaults tonil.id(:string) - Defaults tonil.name(:string) - Defaults tonil.value(:any) - Defaults tonil.rows(:integer) - Lines shown. The design's field is 84px high (3 lines of 21px,min-height): more lines make it taller. Defaults to3.variant(:string) - Defaults to"outlined". Must be one of"outlined","filled", or"plain".size(:string) - Defaults tonil.Must be one ofnil,"sm","md", or"lg".resizable(:boolean) - Defaults tofalse.counter(:boolean) - Defaults tofalse.counter_format(:string) - Defaults to"%{count} / %{max}".counter_align(:string) - Defaults to"end". Must be one of"end", or"start".min_length(:integer) - Defaults tonil.autogrow(:boolean) - Defaults tofalse.max_rows(:integer) - Defaults tonil.tokens(:boolean) - Defaults tofalse.state(:string) - Defaults tonil.Must be one ofnil,"","success", or"error".label(:string) - Defaults tonil.label_class(:any) - Defaults tonil.label_hint(:string) - Defaults tonil.help(:string) - Defaults tonil.errors(:list) - Defaults to[].disabled(:boolean) - Defaults tofalse.wrapper_class(:any) - Defaults tonil.frame_class(:any) - Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["autocomplete", "autofocus", "cols", "form", "maxlength", "minlength", "placeholder", "readonly", "required", "wrap"].
Slots
footer- Content below the text, laid out as a row (alu-cntgoes to the end).header- Content above the text, laid out as a row.