input<T> function

Element input<T>({
  1. String? type,
  2. String? name,
  3. T? value,
  4. String? placeholder,
  5. String? id,
  6. String? className,
  7. Map<String, dynamic>? attributes,
  8. FutureOr<void> onInput(
    1. Event
    )?,
  9. dynamic onChange(
    1. Event
    )?,
  10. dynamic onKeyDown(
    1. KeyboardEvent
    )?,
  11. dynamic onKeyUp(
    1. KeyboardEvent
    )?,
})

Implementation

Element input<T>({
  String? type,
  String? name,
  T? value,
  String? placeholder,
  String? id,
  String? className,
  Map<String, dynamic>? attributes,
  FutureOr<void> Function(web.Event)? onInput,
  Function(web.Event)? onChange,
  Function(web.KeyboardEvent)? onKeyDown,
  Function(web.KeyboardEvent)? onKeyUp,
}) => h(
  'input',
  id: id,
  className: className,
  attributes: {
    'type': type,
    'name': name,
    'value': value,
    'placeholder': placeholder,
    ...?attributes,
  },
  events: {
    'input': ?onInput,
    'change': ?onChange,
    'keydown': ?onKeyDown,
    'keyup': ?onKeyUp,
  },
  selfClosing: true,
);