US sitcom Modern Family has cast the first openly transgender child actor on television for an upcoming episode of the popular TV show.

Jackson Millarker, 8, will play a transgender character in scenes with young character Lily during Wednesday night’s episode.

Episode director Ryan Case posted a picture with Millarker on Instagram with the caption: “This is Jackson Millarker. He's 8 years old, from Atlanta, and just happens to be transgender.”

While transgender adult Laverne Cox won an Emmy for her role in Netflix’s Orange is the New Black, Millarker is the first transgender child actor to appear on television.

Modern Family has been commended for featuring a gay couple as lead characters in the family sitcom, with some crediting the show for normalizing gay parents to viewers.

There has also been a generally favorable reaction on social media with many describing it as “awesome” and that such “transgender visibility is critical.”

Not everyone has welcomed the casting though, with some branding it as being “child abuse made into entertainment” and that “Hollywood has gone too far.”

Am I the only one who is uncomfortable labelling a child anything let alone transgender? https://t.co/RpTc2xgDgL — Mark Gaynor (@MarkRabob6) September 27, 2016