“Jane the Virgin” star Justin Baldoni has come on board to produce and direct an untitled teen romance movie for CBS Films, which bought Baldoni’s pitch for the project.

Baldoni will produce via his Wayfarer production company. No actors are yet attached.

Mikki Daughtry and Tobias Iaconis are writing the screenplay for the story, which centers on two teens with life-threatening illnesses who meet in a hospital and begin to fall in love — despite the fact that their fragile health makes them an imminent danger to each other. They ultimately realize that sometimes love is a risk worth taking.

Mark Ross is overseeing the project for CBS Films.

Baldoni also came on board last year to produce and direct the Warner Bros. project “Clouds,” based on Laura Sobiech’s inspirational book “Fly a Little Higher” about her late son Zach Sobiech. The son had a rare form of bone cancer and died in 2013, shortly after turning 18.

Daughtry and Iaconis have set up the drama “The Children” at New Line, in which a social worker investigates the disappearance of two children. Michael Chaves is directing.

Baldoni is represented by Liz York and Eric Robinson at Gotham Group. Daughtry and Iaconis are represented by Paradigm. The news was first reported by Deadline Hollywood.