Mr. Andrews, 19, said that books for young adults on the subject were scarce when he began transitioning to male from female in 2011.

“When I first started transitioning, I mostly had YouTube as a source,” he said. “I wanted to write a book to help others because there were not a lot of sources out there, and I thought that one book could save a person’s life.”

Mr. Andrews says he receives 15 to 20 Facebook messages a day from readers about his memoir, “Some Assembly Required,” including notes from children as young as 8 and readers in their 60s and 70s who say the book helps them navigate questions about their gender identity.

The body of children’s literature on the subject is still tiny and relatively new. When Julie Anne Peters published “Luna,” a novel about a teenage girl whose brother wants to be a girl, in 2004, it was the first young-adult novel with a transgender character to be released by a mainstream publisher. Since then, more than 50 novels with transgender characters have been published, mostly for teenagers, according to Talya Sokoll, a librarian who compiled a reading list of children’s books with trans characters.

Some of the writers who are exploring the topic have faced criticism and online attacks. A blistering Amazon review for “I am Jazz,” written for 4- to 8-year-olds, called the story of a transgender girl “inappropriate material for young readers,” while another reviewer scolded, “We should not be indoctrinating young kids about ‘trans.’ ”

But writers and publishers have been undeterred, noting that child psychologists and L.G.B.T. advocacy groups argue that very young children can question their gender identity and that families should be open to discussing the subject. The next frontier for authors writing about transgender people seems to be middle-grade literature, or books aimed at 8- to 12-year-olds. In November, Disney Hyperion published “Gracefully Grayson,” a novel for readers ages 10 and up about a sixth-grade boy who feels like a girl.