LineOne's textareas: outlined or filled, fixed or resizable, and framed with a header or a footer (a title input, a toolbar, a submit button).
<.textarea name="bio" placeholder="Enter Text" />
<.textarea field={@form[:bio]} label="Bio" variant="filled" resizable />
<.textarea name="post" rows={5} placeholder="Write the post">
<:header>
<.input name="title" variant="plain" class="p-3 text-lg font-medium" placeholder="Title" />
</:header>
<:footer>
<span>…toolbar…</span>
<.button color="primary" size="sm">Save Post</.button>
</:footer>
</.textarea>
Summary
Functions
Renders a <textarea>. With a header or footer slot it sits, borderless, inside a
bordered frame that lights up while it has focus.
Functions
Renders a <textarea>. With a header or footer slot it sits, borderless, inside a
bordered frame that lights up while it has focus.
Attributes
field(Phoenix.HTML.FormField) - Defaults tonil.id(:string) - Defaults to the field's id.name(:string) - Defaults to the field's name.value(:any)rows(:integer) - Defaults to4.variant(:string) - Defaults to"outlined". Must be one of"outlined","filled", or"plain".resizable(:boolean) - Defaults tofalse.state(:string) - Defaults tonil.Must be one ofnil,"success", or"error".label(:string) - The caption. Defaults tonil.label_class(:any) - Classes of the caption text. Defaults tonil.help(:string) - The small line under the control. Defaults tonil.errors(:list) - Messages to show;fieldadds its own once the input was used. Defaults to[].disabled(:boolean) - Defaults tofalse.wrapper_class(:any) - Classes of the outer block (grid placement, spacing). Defaults tonil.frame_class(:any) - Classes of the frame drawn around header/footer. 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
header- Content above the text, laid out as a row.footer- Content below the text, laid out as a row with space between.