N.K.
With a child this young, you really can't assume she has an awareness of her behavior. So you can't punish her like you would an older child. I have four children and they've gone through phases like this. My best advice for you is to model the behavior you want her to mimic. If she hits you or someone else, immediately tell her "No hit" or something like that and then say "Soft" or "Gentle" and gently stroke her hand or use her hand to gently stroke your face. You may find words that are more effective for you to use but the essence is to show her how you want her to behave. All she knows is from you and your husband.
I think ignoring her behavior may work in some instances but it doesn't address how you want her to behave. And she won't know unless you tell her.
Good luck!