Hilary Duff shows off her bikini body with ex-husband Mike Comrie and their adorable son

Hilary Duff celebrated Labor Day at the beach with her son, Luca (pictured at far left with a friend), and her ex-husband, Mike Comrie. (Photo: AKM-GSI)

Hilary Duff and Mike Comrie are divorced, but they’re a tight family unit for the sake of their son.

The couple, who split in February 2016 after six years of marriage, spent Monday at the beach in Malibu, Calif., with their 5-year-old, Luca. Duff wore a $95 black, Vitamin A bikini as she played in the surf with her son and his friend, while former NHL player Comrie kicked back wearing a trucker hat.

Hilary Duff with her ex-husband, Mike Comrie (in the hat), in Malibu, Calif. (Photo: AKM-GSI)

Duff and Comrie are among the few Hollywood couples (Jennifer Garner and Ben Affleck, Gwyneth Paltrow and Chris Martin) who have nailed their co-parenting relationship — even vacationing together from the onset of their divorce. It’s an effort they’ve been praised for, both on social media and by other celebrities.

The Younger actress, 29, has always been refreshingly candid about her divorce, telling Cosmopolitan in 2015, “It wasn’t working well enough to stay together, but there was still a lot of love involved. It was just a slow set-in of us not being the match that we used to be. I’m lucky for the person he is and I am and how we decided to handle this.”

Hilary Duff and Mike Comrie have a positive co-parenting relationship. (Photo: Noel Vasquez/Getty Images)

She added, “I don’t want to sound bitter because I’m definitely not, but I don’t know if people are meant to be together forever. Things happen over a long relationship that you can’t always fight. A marriage of 20 years, the accomplishment of that must feel really great, but there are also huge sacrifices. I just always want to fight for happiness.”

That same year, Duff told People that she was “really proud” of her and Comrie’s resolution, explaining, “We are a unit and we’re going to be a unit for the rest of our lives. We realized [as a couple] we weren’t where we used to be. But I feel so lucky this happened when Luca was young because this is his normal now.”

The ex-couple also joined forces for Luca’s fourth birthday, tweeting a family photo with the caption, “We are so proud of this boy.”

In 2016, after Ellen DeGeneres commended Duff for her commitment to peaceful parenting, Duff replied, “I think that’s the way it should be. We have such a great kid, and we’re both so obsessed with him. We are good friends and we laugh a lot and we have a great communication. We share pictures when one is not with Luca. Yeah, he’s great. We are great and we keep on trucking.”

Duff has also been honest about the challenges involved in sharing custody. “Some of my friends tell me, ‘God, it must be so nice, you get a break from your kid because you share him,’” Duff told Redbook in March. “I’m divorced, and it sucks. Well, it did suck for a while; now it’s just normal. But it’s true, I do get a break. I had Luca by myself for a few weeks, no help, when Mike was on the road, and when he got home I was like, ‘He’s yours! Bye!’”

Hilary Duff and Mike Comrie had lunch together without their son on Aug. 30. (Photo: AKM-GSI)

In the same interview, Duff also opened up about dealing with mom guilt, explaining that she often feels “torn” about work-life balance, jokingly calling herself Luca’s chauffeur.

So what are Duff and Comrie doing right? “Smart, healthy couples compartmentalize their marriage from their parenting,” Jonathan Alpert, a Manhattan-based psychotherapist and the author of Be Fearless, tells Yahoo Beauty. “Divorced couples should keep the focus on their child and not badmouth the other, to avoid creating confusion for their child.”

That’s true no matter the age of the child or the romantic status of the parent — Duff rebounded with personal trainer Jason Walsh post-divorce and then dated music producer Matthew Koma, with whom she recently split.

Says Alpert, “This couple is going out of their way to stay positive and give their son a normal life.”

Read more from Yahoo Style + Beauty:

Follow us on InstagramFacebook, and Pinterest for nonstop inspiration delivered fresh to your feed, every day. For Twitter updates, follow @YahooStyle and@YahooBeauty.