Everything, Everything—a story about a girl who is allergic to the outside world but is willing to risk it all for the boy next door—arrives in movie theaters on May 19. The film is based on Nicola Yoon’s bestselling YA novel, published by Delacorte in 2015. Amandla Stenberg (Rue in The Hunger Games) stars as Maddy Whittier, whose condition requires that she live in a sanitized indoor environment. Nick Robinson (The 5th Wave) plays her neighbor and love interest, Olly Bright. The movie is directed by Stella Meghie and will be released by Warner Bros. and Metro-Goldwyn-Mayer. Yoon spoke with PW about what sparked her idea for the story and about the whirlwind experience of having her book adapted to the screen.

Though the love story between Maddy and Olly is central to Everything, Everything, the romantic element wasn’t what first led Yoon to write the novel. Instead, she developed the book following the birth of her daughter (“I was a very nervous mom,” she admitted). In channeling this “intense experience of new motherhood” she began thinking about what it might be like to have a child who was unusually vulnerable to the outside world.

The relationship between Maddy and her mother—and motherhood itself—would remain an important component of the book, though Yoon decided to focus more specifically on Maddy’s character. Yoon looks at Maddy’s story as somewhat of “a fairy tale,” or a “heightened situation” that nevertheless represents common experiences for teenagers. Like Maddy, “teens push boundaries—they want freedom but also to be protected” by their parents. Maddy’s desire to be with Olly, despite the detriments to her health, also represents taking chances and risks in the name of love.

As is common for authors, Yoon had some initial worries about how the film would capture her story. Because Maddy is confined indoors, she relies on books and her own “flights of fancy” to connect with what lies beyond her window. Yoon wondered how the filmmakers would adapt the novel’s elements of intertextuality to the screen. Her concern was assuaged after meeting director Meghie: “Her vision was so clear,” Yoon said. “She really wanted to be faithful to the book,” including the content that might not be so easily translatable.

Yoon reflected back on the months in 2012 when the idea for Everything, Everything first sprouted. At the time, Yoon had a job in finance that she hated; writing was something she had put on the back burner. But she realized that in neglecting her writing, she wasn’t setting the example that she wanted to set for her child: “I was telling my daughter that she can be anything she wants, but I wasn’t doing that,” she said.

Yoon couldn’t have imagined then that, in just a few years, not only would Everything, Everything be published, but that she and her daughter would be visiting its movie set. Yoon added that the casting of Stenberg was, for her, especially gratifying. She hopes that seeing characters like Maddy on the big screen sends a valuable message both to her daughter and other girls: “Black girls can be leads in movies,” she said.