Yes, it is. Any contribution by a foreign national to the campaign of an American candidate for any election, state or national, is illegal. It's part of the Federal Election Campaign Act.
Here you go:
https://www.fec.gov/updates/foreign-nationals/
Have a super day.