Kevin Shattenkirk could’ve gotten more money but took less to join the Rangers.

Joe Thornton could’ve gotten a multiyear deal from someone but wanted to stay with the Sharks.

Brian Campbell and Patrick Sharp could’ve gotten more money the past two summers but took the Chicago discount to return to the Blackhawks.

The NHL is becoming more like the NBA with top players forgoing longer, big-money contracts to pick their preferred destination, a trend that has added a new wrinkle to free agency.

“It’s their opportunity to go to where they want to go and sometimes you might have to take a little bit less money to go there,” Stars general manager Jim Nill said. “Do you want to go to a good team? Is it a city you want to go to? Is it where your family wants to be? … It’s players finding the right fit for where they want to be and having the money that they can live with.”

Shattenkirk, 28, the New Rochelle, New York, native, turned down offers of seven years and more than $30 million to sign with the Rangers for $26.6 million over four years. The defenseman felt like it might be his only opportunity to “fulfill a lifelong dream.”

“No matter where you go you’re trying to win your team a Stanley Cup,” Shattenkirk said. “There’s no better place to try to do it for me than in New York.”

Rangers GM Jeff Gorton praised Shattenkirk for leaving money and years on the table, and even Devils GM Ray Shero — who made a strong push to sign the top free agent available — gave him credit for signing in New York because it was “where he wanted to be.”

The NHL’s hard salary cap and players re-signing to so many long-term deals means superteams like in the NBA won’t happen. But where and who matters more and more to hockey players than simply how much and for how long.

Thornton had more than half the 31-team league reach out to sign him at age 38, and he signed for $8 million for one year because he simply wanted to stay in San Jose.

“It was nice getting courted by all these teams, and I felt bad saying, ‘Hey I’m going back to San Jose,’ but that’s where my heart is and that’s where I’m happy,” Thornton said.

Likewise, Sharp couldn’t pass up returning to Chicago where he was part of three Stanley Cup teams, even if his contract is worth just $850,000 with performance bonuses. Sharp said he was “coming back to make some more great memories and try to help this team win another Stanley Cup.”

Justin Williams and his wife bought a house near Raleigh, North Carolina, before signing a $9 million, two-year deal to go back to the Hurricanes. Ryan Miller called it “pretty ideal” to sign a $4 million, two-year contract in Anaheim, close to Hollywood where actress wife Noureen DeWulf needs to be often for her work.

Familiarity with Nashville and coach Peter Laviolette led Scott Hartnell to return to the Predators on a $1 million, one-year deal, after playing his first six NHL seasons with them.

“Absolutely love coming back to Nashville,” Hartnell said. “I wish it was October already.”

Ice chips

The Avalanche signed former No. 1 overall pick Nail Yakupov to a one-year deal.

... The Hurricanes acquired Marcus Kruger from the Golden Knights, the forward’s second trade in three days, for a fifth-round pick in the 2018 draft. Chicago traded Kruger to Vegas on Sunday for undisclosed future considerations.

... Right winger Andre Burakovsky and the Capitals agreed to a $6-million, two-year contract.

... The Sharks signed free-agent forward Brandon Bollig to a one-year contract.