Sarah Hyland is taking a break from social media ''for a while'' after she was slammed for urging fans to donate money to help with funeral costs following the death of her 14-year-old cousin.

The 'Modern Family' actress was left devastated over the weekend after her relative, Trevor Canaday, was killed in a car crash, which she alleged was the fault of a drunk driver, and she shared the teen's GoFundMe page, which aims to fund his funeral and medical expenses.

But Sarah - who donated $1,000 to the cause - has been left ''broken'' after she was hit with a negative backlash from several social media users, and has vowed to stay offline.

She tweeted: ''I'd like to ask those who have negative thoughts or opinions about the tragedy that happened to my family, to keep them to themselves. You don't know all the details. And how dare you attack when a beautiful life has been lost.

''You guys finally did it. Your horrible negative ignorant words have broken me. Happy? Staying offline for a while. I have a special announcement and video releasing on Wednesday I believe. So. There's that. (sic)''

Sarah had taken to her Instagram Stories to encourage her six million followers to donate to Trevor's GoFundMe page.

She wrote: ''This is my 14 year old cousin Trevor. Yesterday, he was killed by a drunk driver. My uncle is still in the hospital in need of more surgeries. (sic)''

But several social media users have blasted the 28-year-old actress for urging fans to donate.

One tweeted: ''You only have yourself to blame for this backlash, unless there's some massive detail we're all missing. Asking complete strangers to contribute to the funeral expenses of your own family member which you could easily pay for yourself is low-class and unconscionable.(sic)''

Another wrote: ''If you didn't want negativity then do the right thing and pay for the entire amount. No brainer. You can obviously afford to and it's weird to put your name to it asking for donations when you earn 100 times more than the ppl you're soliciting donations from (sic)''

Trevor's GoFundMe page, which has raised more than $35,000, was set up by Tessa Canaday, her sister Zoee and mum Becky, the siblings and mother of Trevor and daughters and wife of his dad Bryan, who is ''recovering physically'' following the crash.

It reads: ''On Saturday 12/1 Trevor and his dad were driving to a show choir event and were involved in a serious car accident due to a drunk driver.

''His dad, Bryan, is recovering physically, but sadly Trevor has gained his wings and is singing and playing some crazy football in heaven.

''We are looking to help his mom, Becky, with funeral and hospital expenses in any way we can! We hope to have the funeral entirely covered and then will move forward with covering medical expenses from keeping Trevor stable and from dads surgery's and rest at the hospital (UNMC).

''We will be getting the money to Mom (Becky) as soon as possible with the help of all of you by her being the beneficiary and depositing money into her account to relieve her worries as much as we can. (sic)''