The full Hunter's Prey ability is written as such (Player's Handbook p.93, emphasis mine):
Hunter’s Prey
At 3rd level, you gain one of the following features of your choice.
Colossus Slayer
Your tenacity can wear down the most potent foes. When you hit a creature with a weapon attack, the creature takes an extra 1d8 damage if it’s below its hit point maximum. You can deal this extra damage only once per turn.
Giant Killer
When a Large or larger creature within 5 feet of you hits or misses you with an attack, you can use your reaction to attack that creature immediately after its attack, provided that you can see the creature.
Horde Breaker
Once on each of your turns when you make a weapon attack, you can make another attack with the same weapon against a different creature that is within 5 feet of the original target and within range of your weapon.
I've highlighted the reason I'm quoting the whole feature: Horde Breaker and Colossus Slayer both specify the abilities require a weapon attack, but Giant Killer does not. Could it reasonably be argued that the ranger could instead cast a leveled spell or cantrip, as long as it is a spell attack, as a reaction?