Noora.TextArea (noora v0.47.0)
Renders textarea components with customizable labels, placeholders, character counting, and event handling.
Example
<.text_area name="description" label="Description" placeholder="Enter description" />
<.text_area name="message" label="Message" required={true} show_required={true} />
<.text_area name="notes" label="Notes" hint="Additional information" />
<.text_area name="content" label="Content" max_length={500} />
Summary
Functions
Attributes
id(:string)field(Phoenix.HTML.FormField) - A Phoenix form field.label(:string) - Label to be rendered above the textarea. Defaults tonil.sublabel(:string) - Sublabel to be rendered above the textarea. Defaults tonil.hint(:string) - Hint text to be rendered below the textarea. Defaults tonil.hint_variant(:string) - Hint text variant. Defaults to"default".error(:string) - Errors to be rendered below the textarea. Takes precedence overhint.show_error_message(:boolean) - Whether to show the error message below the textarea. Defaults totrue.name(:string) - The name of the textarea.value(:string) - The value of the textarea.placeholder(:string) - Placeholder text to be rendered in the textarea. Defaults tonil.required(:boolean) - Whether the textarea is required. Defaults tofalse.show_required(:boolean) - Whether the required indicator is shown. Defaults tofalse.rows(:integer) - Number of visible text lines for the textarea. Defaults to4.max_length(:integer) - Maximum number of characters allowed. Defaults to200.show_character_count(:boolean) - Whether to show the character count. Defaults totrue.resize(:string) - CSS resize property for the textarea. Defaults to"vertical". Must be one of"none","both","horizontal", or"vertical".disabled(:boolean) - Whether the textarea is disabled. Defaults tofalse.- Global attributes are accepted.