Receptive HUD

I’d like to create a HUD that only appears when things like Stamina and Health are active. For example: I only want the stamina bar to appear when the character is using stamina and disappear when the stamina recharges and becomes full again. As for the health: I only want the health bar to appear once the character is damaged and fade away if their health is replenished and becomes full again. I think Skyrim did this or something like this. What would be the best way to go about this? Thank you!