(CNN) -- "Frances Ha" star Greta Gerwig is your new Ted.
The 30-year-old actress, known mainly for her film work, has been cast as the lead in the pilot of CBS' "How I Met Your Mother" spinoff, "How I Met Your Dad."
"How I Met Your Mother" has been airing on CBS since 2005 and is one of the network's flagship comedies. Created by Carter Bays and Craig Thomas, "HIMYM" centers on Josh Radnor's Ted and his friends as Ted recounts through a series of flashback stories how he met his future wife.
For the spinoff pilot, Bays and Thomas are collaborating with "Up All Night's" Emily Spivey on a similar concept, but one with a gender reversal. This time, it'll be Gerwig's Sally who retraces how she met her partner.
In its official description, CBS describes Gerwig's character as "a female Peter Pan who has never grown up and has no idea of where she's going in life." Faced with a breakup with her husband of less than a year, Sally turns to her friends and family for support, even though they're "often too willing to give 'good' advice that can backfire badly."
Before signing on to "How I Met Your Dad," Gerwig was building a career mainly in indie film, including standouts such as "Lola Versus," "To Rome With Love" and 2012's "Frances Ha," which earned the actress a Golden Globe nomination. According to Deadline Hollywood, the creative team behind "HIMYD" was so intent on landing Gerwig that "the studio is willing to move production of the series to New York for her after the pilot, which will be shot in Los Angeles."
Gerwig will also serve as a producer on the comedy and is expected to pitch in with writing if the show is picked up as a series.
CBS' "How I Met Your Mother" will air its series finale on March 31.