Not one a child threw recently, but still by far my most favorite tantrum came when I was chatting with a young boy who I cared for about the very large salad bowl he had found in the kitchen and was playing with.
"It salad bowl," he proudly said, and then as he attempted to fit inside of it he declared, "I salad."
His older brother then came up and said, "You are not lettuce."
The younger boy absolutely completely and totally lost it and melted all the way down, repeating the phrase, "Yes, lettuce. Am a lettuce."
Of course we all ought to know that nothing about this meltdown was specifically due to the fact that the boy was not in fact a green leafy plant. It was due to the fact that he'd had it up to here with his brother trashing on his play and needed to release some of that irk.
How I handled it: I held space for his big feelings. I let him cry and fuss and kick and yell. So long as he wasn't hurting himself or others, he needed to process the injustice done to him by his brother and he needed to feel the feelings caused by it. I made sure he was in a safe place and let him become a little adorable ball of emotions and waited for that change in cry, you know the one, where the anger changes to sadness. When we got there, I came over and gave voice to his feelings ("You felt undermined and invalidated. Your brother wasn't invited into your play but he interrupted in order to destroy it, anyway. That made you mad.") He came in for a hug, feeling seen and understood. I offered that I could help him come up with some ways to approach his brother about the situation if he wanted. He didn't want. And so that was that. Within 5 minutes of the start of sad-cry, he was off on another game, this one trying (and failing) to levitate his hotwheels cars.
As a parent, you do not give attention to any behavior that is unacceptable.
Any attention given to a child during a tantrum is attention; the child quickly learns a tantrum gets rewarded because you react. Any attention given from a behavior, whether it’s from good or bad behavior is “attention”.
If a child is in a tantrum, no matter how extreme it gets, ignore the behavior. Your tantrum problem will be solved in less than a week.
"Ignore the behavior" is a radical oversimplification. A better approach would be to make sure you've developed the skills in yourself to remain completely calm and unaffected when a tantrum happens, then you make yourself present but calm and uninterested until the child calms down, at which point you immediately reward them being calm with affection and attention, or whatever it is they would perceive as a reward. Without the reward part, ignoring a negative behavior risks worsening it over time. Also this is clearly not always possible, eg if you're in a public setting or if the child is doing something dangerous.