Terrible next level, that's unpaid work and it's already a thing in interviewing at some unethical companies.
It is probably realistic to expect someone to write something useful (although possibly small) in three days. It is less realistic to expect someone to write a useful component integrated in a large system that they have to learn, in three days.