PhoenixKitWeb.Components.Core.Textarea (phoenix_kit v2.2.0)

Copy Markdown View Source

Provides a default textarea UI component.

Summary

Functions

textarea(assigns)

Attributes

  • field (Phoenix.HTML.FormField)
  • id (:any) - Defaults to nil.
  • name (:any)
  • label (:string) - Defaults to nil.
  • value (:any)
  • errors (:list) - Defaults to [].
  • class (:any) - extra classes merged onto the <textarea> element (e.g. textarea-sm, min-h-[12rem]). Defaults to nil.
  • mentions (:boolean) - offer @ people and # records as the user types. Needs use PhoenixKit.Mentions.Live on the LiveView for the search handler; without JavaScript the field behaves exactly as it does today. Defaults to false.
  • Global attributes are accepted. Supports all globals plus: ["autocomplete", "cols", "maxlength", "disabled", "placeholder", "readonly", "required", "rows"].