textarea<L, V> function

DomElement<L, V> textarea<L, V>({
  1. String? key,
  2. List<String>? classes,
  3. Map<String, String>? attributes,
  4. Map<String, String>? styles,
  5. String? accesskey,
  6. String? autocapitalize,
  7. String? autocomplete,
  8. String? cols,
  9. String? contenteditable,
  10. String? dir,
  11. String? dirname,
  12. bool? disabled,
  13. String? draggable,
  14. String? enterkeyhint,
  15. String? form,
  16. String? hidden,
  17. String? id,
  18. String? inputmode,
  19. String? itemprop,
  20. String? lang,
  21. String? maxlength,
  22. String? minlength,
  23. String? name,
  24. String? placeholder,
  25. bool? readonly,
  26. bool? required,
  27. String? role,
  28. String? rows,
  29. String? slot,
  30. String? spellcheck,
  31. String? tabindex,
  32. String? title,
  33. String? translate,
  34. String? wrap,
  35. Map<String, DomEventFn<L, V>>? events,
  36. DomLifecycleEventFn<L>? onCreate,
  37. DomLifecycleEventFn<L>? onUpdate,
  38. DomLifecycleEventFn<L>? onRemove,
  39. Iterable<DomNode<L, V>>? children,
  40. DomNode<L, V>? child,
  41. String? text,
})

Represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example, a comment on a review or feedback form.

Implementation

DomElement<L, V> textarea<L, V>({
  String? key,
  List<String>? classes,
  Map<String, String>? attributes,
  Map<String, String>? styles,

  /// Keyboard shortcut to activate or add focus to the element.
  String? accesskey,

  /// Sets whether input is automatically capitalized when entered by user
  String? autocapitalize,

  /// Indicates whether controls in this form can by default have their values
  /// automatically completed by the browser.
  String? autocomplete,

  /// Defines the number of columns in a textarea.
  String? cols,

  /// Indicates whether the element's content is editable.
  String? contenteditable,

  /// Defines the text direction. Allowed values are ltr (Left-To-Right) or
  /// rtl (Right-To-Left)
  String? dir,

  ///
  String? dirname,

  /// Indicates whether the user can interact with the element.
  bool? disabled,

  /// Defines whether the element can be dragged.
  String? draggable,

  /// The enterkeyhint
  /// specifies what action label (or icon) to present for the enter key on
  /// virtual keyboards. The attribute can be used with form controls (such as
  /// the value of textarea elements), or in elements in an
  /// editing host (e.g., using contenteditable attribute).
  String? enterkeyhint,

  /// Indicates the form that is the owner of the element.
  String? form,

  /// Prevents rendering of given element, while keeping child elements, e.g.
  /// script elements, active.
  String? hidden,

  /// Often used with CSS to style a specific element. The value of this
  /// attribute must be unique.
  String? id,

  /// Provides a hint as to the type of data that might be entered by the user
  /// while editing the element or its contents. The attribute can be used
  /// with form controls (such as the value of
  /// textarea elements), or in elements in an editing host
  /// (e.g., using contenteditable attribute).
  String? inputmode,

  ///
  String? itemprop,

  /// Defines the language used in the element.
  String? lang,

  /// Defines the maximum number of characters allowed in the element.
  String? maxlength,

  /// Defines the minimum number of characters allowed in the element.
  String? minlength,

  /// Name of the element. For example used by the server to identify the
  /// fields in form submits.
  String? name,

  /// Provides a hint to the user of what can be entered in the field.
  String? placeholder,

  /// Indicates whether the element can be edited.
  bool? readonly,

  /// Indicates whether this element is required to fill out or not.
  bool? required,

  /// Defines an explicit role for an element for use by assistive technologies.
  String? role,

  /// Defines the number of rows in a text area.
  String? rows,

  /// Assigns a slot in a shadow DOM shadow tree to an element.
  String? slot,

  /// Indicates whether spell checking is allowed for the element.
  String? spellcheck,

  /// Overrides the browser's default tab order and follows the one specified
  /// instead.
  String? tabindex,

  /// Text to be displayed in a tooltip when hovering over the element.
  String? title,

  /// Specify whether an element's attribute values and the values of its
  /// Text node
  /// children are to be translated when the page is localized, or whether to
  /// leave them unchanged.
  String? translate,

  /// Indicates whether the text should be wrapped.
  String? wrap,
  Map<String, DomEventFn<L, V>>? events,
  DomLifecycleEventFn<L>? onCreate,
  DomLifecycleEventFn<L>? onUpdate,
  DomLifecycleEventFn<L>? onRemove,
  Iterable<DomNode<L, V>>? children,
  DomNode<L, V>? child,
  String? text,
}) {
  return DomElement<L, V>(
    'textarea',
    key: key,
    classes: classes,
    attributes: <String, String>{
      if (accesskey != null) 'accesskey': accesskey,
      if (autocapitalize != null) 'autocapitalize': autocapitalize,
      if (autocomplete != null) 'autocomplete': autocomplete,
      if (cols != null) 'cols': cols,
      if (contenteditable != null) 'contenteditable': contenteditable,
      if (dir != null) 'dir': dir,
      if (dirname != null) 'dirname': dirname,
      if (disabled ?? false) 'disabled': 'disabled',
      if (draggable != null) 'draggable': draggable,
      if (enterkeyhint != null) 'enterkeyhint': enterkeyhint,
      if (form != null) 'form': form,
      if (hidden != null) 'hidden': hidden,
      if (id != null) 'id': id,
      if (inputmode != null) 'inputmode': inputmode,
      if (itemprop != null) 'itemprop': itemprop,
      if (lang != null) 'lang': lang,
      if (maxlength != null) 'maxlength': maxlength,
      if (minlength != null) 'minlength': minlength,
      if (name != null) 'name': name,
      if (placeholder != null) 'placeholder': placeholder,
      if (readonly ?? false) 'readonly': 'readonly',
      if (required ?? false) 'required': 'required',
      if (role != null) 'role': role,
      if (rows != null) 'rows': rows,
      if (slot != null) 'slot': slot,
      if (spellcheck != null) 'spellcheck': spellcheck,
      if (tabindex != null) 'tabindex': tabindex,
      if (title != null) 'title': title,
      if (translate != null) 'translate': translate,
      if (wrap != null) 'wrap': wrap,
      ...?attributes,
    },
    styles: styles,
    events: events,
    onCreate: onCreate,
    onUpdate: onUpdate,
    onRemove: onRemove,
    children: children,
    child: child,
    text: text,
  );
}