There are some tactical nuclear weapons (such as nuclear torpedoes, depth charges, surface to air missiles, and artillery shells) which had a variable yield on them. This leads me to believe the amount of fissile material in the weapon doesn’t change, but they can flip a switch or something to alter how big of an explosion the weapon makes.
How do they do this?!
I’ll admit it seems very clever considering tactical nuclear weapons seem to be rather overkill in the first place. But I’m curious as to how exactly they do it.