There are quite a few ways to get HTML component’s prop types in React. Let’s go through them and use <button> as an example.

TLDR; use following:

type ButtonProps = React.ComponentPropsWithoutRef<'button'>;

// Example: if you want to override onClick to allow async functions:
type ButtonProps = ComponentPropsWithoutRef<'button'> & {
  onClick?: (
    event: MouseEvent<HTMLButtonElement, globalThis.MouseEvent>,
  ) => void | Promise<void>;
};

Best methods

Works but verbose:

Does not work:

For more information read