$input

El $input({

  1. String? key,
  2. String? className,
  3. String? id,
  4. String? type,
  5. String? name,
  6. String? value,
  7. String? placeholder,
  8. bool? disabled,
  9. bool? readOnly,
  10. bool? required,
  11. Map<String, dynamic>? style,
  12. Map<String, dynamic>? spread,
  13. void onChange(
    1. SyntheticEvent
    )?,
  14. void onInput(
    1. SyntheticEvent
    )?,
  15. void onFocus(
    1. SyntheticFocusEvent
    )?,
  16. void onBlur(
    1. SyntheticFocusEvent
    )?,
  17. void onKeyDown(
    1. SyntheticKeyboardEvent
    )?,
  18. void onKeyUp(
    1. SyntheticKeyboardEvent
    )?,
})

Creates an <input> element wrapper for JSX-style composition.

Implementation

El $input({
  String? key,
  String? className,
  String? id,
  String? type,
  String? name,
  String? value,
  String? placeholder,
  bool? disabled,
  bool? readOnly,
  bool? required,
  Map<String, dynamic>? style,
  Map<String, dynamic>? spread,
  void Function(SyntheticEvent)? onChange,
  void Function(SyntheticEvent)? onInput,
  void Function(SyntheticFocusEvent)? onFocus,
  void Function(SyntheticFocusEvent)? onBlur,
  void Function(SyntheticKeyboardEvent)? onKeyDown,
  void Function(SyntheticKeyboardEvent)? onKeyUp,
}) {
  final p = _buildJsxProps(
    key: key,
    className: className,
    id: id,
    style: style,
    spread: spread,
    onChange: onChange,
    onInput: onInput,
    onFocus: onFocus,
    onBlur: onBlur,
    onKeyDown: onKeyDown,
    onKeyUp: onKeyUp,
  );
  if (type != null) p['type'] = type;
  if (name != null) p['name'] = name;
  if (value != null) p['value'] = value;
  if (placeholder != null) p['placeholder'] = placeholder;
  if (disabled != null) p['disabled'] = disabled;
  if (readOnly != null) p['readOnly'] = readOnly;
  if (required != null) p['required'] = required;
  return El(InputElement.fromJS(_createJsxElement('input', p)));
}