What is the TypeScript definition for the onBlurCapture event in React?

The right interface for onBlurCapture is FocusEvent

Please continue reading below to see how to use it or read my guide on using React's events with TypeScript.

Interface

interface FocusEvent<T = Element> extends SyntheticEvent<T, NativeFocusEvent> {
    relatedTarget: EventTarget | null;
    target: EventTarget & T;
}

Full example

import React, { FocusEvent } from 'react';

const InputComponent = () => {
  const handleFocusEvent = (e: FocusEvent<HTMLInputElement>) => {
    // Do something
  };

  return <input value="Some text" onBlurCapture={handleFocusEvent} />;
};

export default InputComponent;

Attributes that use FocusEvent: