NSW Premier Mike Baird has defended a move to prevent a documentary about gay parenting from being shown during class time in state schools.

Burwood Girls High School sent parents a flyer last week informing them that all students would attend a screening of the film Gayby Baby during class hours on Friday, as part of Wear It Purple Day — an initiative designed to promote acceptance and tolerance of diversity.

The PG-rated film follows the lives of four children — Gus, Ebony, Matt and Graham —growing up with gay parents.

After some interest groups and parents expressed concerns, the Burwood Girls principal said students could be excused from attending if they had written permission.

But in a statement, Education Minister Adrian Piccoli confirmed he had intervened.

"I have directed the Department of Education to ensure the film is not shown during school hours," he said.

Mr Baird said he supported schools screening the film, but not during class.

"I understand the intent of that is to provide an example of tolerance and that's something I absolutely support," he said.

"Should it be in class time? No, I don't think so. Should it be optional? Yes, I do think so."

'An important and wonderful film'

When asked why schools were allowed to screen other documentaries during school hours, Mr Baird suggested Gayby Baby was not as relevant to specific curricula as other films that are shown.

Greens spokeswoman on sexuality and gender identity Jenny Leong slammed the Government's decision as a "kneejerk reaction".

"Gayby Baby is an important and wonderful film telling the stories of a number of families in NSW from the children's perspective," Ms Leong said.

"We live in a world where suicide is a leading cause of death among young people aged 10 to 24, where LGBTIQ (lesbian, gay, bisexual, transgender, intersex and questioning) ... youth are around three times more likely to attempt suicide than their peers.

"The screening of this film in schools as part of Wear It Purple Day is a positive initiative to encourage diversity and social awareness.

"The NSW Education Minister should be showing leadership and standing up against homophobia in our schools."