I'm not sure whether this qualifies as a trap, but I sometimes do this tactic. My opponent pins my knight on f3 against my queen, but by sacrificing my bishop to f7, I can move the knight with check then use the queen to take the bishop.
For instance:
[FEN ""]
1. e4 e5 2. Bc4 Nc6 3. f4 exf4 { C33 King's Gambit Accepted: Bishop's Gambit, Maurian Defense } 4. Nf3 Bc5 5. d4 Bb6 6. O-O d6 7. Bxf4 Bg4 8. Bxf7+ Kxf7 9.Ng5+ Ke8 10.Qxg4
Is there a name for this?
(Side note: Stockfish rates this move as a blunder, decreasing evaluation from 1.7 to 0.3, even though I gain a pawn, prevent black castling, and leave their position more exposed. I'm curious why.).