I've homebrewed a spell that is effectively a combination of shield (in terms of timing) and misty step (in terms of its effect) that I've called reactive step. It's intended for sorcerers, warlocks and wizards.
I've reasoned that it's a 2nd level spell, like misty step, but I wonder if I'm missing something with regards to how it could be used that makes a 2nd level spell slot too cheap, or whether it's so niche that it's actually too expensive. I think it's either probably fine, or it's too cheap for a reason I have not thought of, so I wanted some feedback as to whether it's use justifies it's spell level.
2nd level conjuration
Casting Time: 1 reaction, which you take when you are hit by a melee attack
Components: V, S
When you are hit by a melee attack, you may teleport up to 30 feet to an unoccupied space you can see, turning the triggering attack from a hit into a miss.
I originally toyed with the idea of only teleporting after taking the damage of the triggering attack, but then I decided that it would be less appealing, so I changed it to avoid the damage of the original attack (turning the hit into a miss). I include this because it might be that some think that it would have been balanced as I originally planned, but not in it's current form, so answers may choose to include such a detail. (Based on feedback thus far, I'm almost definitely going to go back to my original idea, but I'm not going to adjust the spell description above, because I don't want to change the question. Hence this question is still about the version of the spell as it's written.)
I've also restricted it to melee attacks, since I think teleporting around in response to ranged attacks is perhaps a bit too powerful for what I intended this spell to be for (primarily for getting squishy spellcasters out of melee), since otherwise it would make cover-shooting a near perfect strategy (run out from behind total cover on your turn to make a ranged attack, teleport back into total cover on the enemy's turn after they try to hit you with one ranged attack, rinse and repeat).
So, in it's current form (restricted to melee attacks, turns the triggering attack into a miss), is this spell balanced, specifically with regards to the spell level?