Dear Mr./Ms. Bossname
Please accept my resignation from (company), effective (date).
I regret the need to depart after (number) years of exciting and innovative work. I have broadened my knowledge and experience with the help of your team, and I appreciate the opportunities the company has offered me.
Unfortunately, my (child is ill, my partner is disabled, my parents were injured, etc.) and my responsibility as caretaker requires that I devote my time to (action).
Thank you for understanding, and for helping me transition through this difficult time.