Sarah Hyland was hospitalised earlier this week.

The 'Modern Family' actress was ''torn from work'' to receive medical treatment for an unknown condition and even though she didn't want to take a break from her job, she's ''very grateful'' to have been looked after because her health is a priority.

She shared a candid photo of herself in a hospital gown on Thursday (21.06.18) and wrote: ''Sometimes a selfie is more than just a good angle or feelin cute. This time for #nationalselfieday I've decided to share my truth. As painful as it is.

''So here is my face that was torn from work against my will. But I'm very grateful it was. Health should ways come first.#stayhealthymyfriends (sic)''

The 27-year-old star also shared a video of her dog licking her face, which had been filmed last weekend, shortly before she was taken to hospital.

She wrote: ''This was taken this past Sunday. Day before hospitalization. She was literally telling me to get treatment.

''Can't wait to come back to my precious angel princess. She's perfect and knows exactly what I need at all times.''

Though it is unclear why Sarah was hospitalised, sources told 'Entertainment Tonight' that she is now back home and doing better.

Sarah - who was diagnosed with kidney dysplasia as a child and received a kidney transplant in 2012 - has spoken candidly about her health struggles in the past in in March she reached out to ask other sufferers of ''chronic pain'' to share their experiences.

She wrote: ''For those who are chronically ill and in chronic pain: ''Have you had the experience of doctors not listening to you? If so, how do you not tear their heads off with your bare hands? :) (sic)''

And last month, she revealed the side-effects from her medication are causing her to lose her hair.

Posting a series of Instagram Stories to her account, she said: ''Help, help, help. What hair-care products are out there for thinning hair?''

''This 27-year-old actress would like to know, I know it seems like I don't, but I do. Some of my medications have been making my hair fall out.''

However the brunette beauty is unable to take over-the-counter hair loss supplements, such as Viviscal and Nutrafol, because they interact with her medication, so turned to her followers for natural remedies.

She continued: ''I've talked to my pharmacist and I'm not allowed to take them because they interact with those medications, so for those on prednisone and Prograf and Myfortic and any immune-suppressing medications, have you found anything other than just biotin that works?''