When Jena Perez and Desiree Glade launched SweetBricks in San Diego’s East Village in 2015, they had no intention of making edibles, a name for cannabis-infused products.

The friends and business partners set out to create gourmet toffee using a recipe from Perez’s mother. Quality toffee, along with a strong social media presence, made business boom. Sweet Bricks quickly outgrew the shared kitchen where they made their sweets.

Perez and Glade launched a Kickstarter campaign in 2015 in hopes of building their own kitchen. When SweetBricks fell just short of its goal, the company was at a crossroads, Perez said.

“That’s when Jetty walked in,” she said. “It was perfect timing.”

Founded in San Diego in 2013 by a group of surfers with a “passion for cannabis,” Jetty Extracts sells carbon dioxide-extracted cannabis oil, particularly for vaping. The company also sponsors the Shelter from the Storm Project, which supplies cannabis oil to cancer patients free of charge.

With each having lost a parent to cancer, Perez and Glade were empathetic about the Shelter from the Storm Project and eager to listen to Jetty Extract’s proposition, which involved infusing their award-winning toffee with cannabis oil. It didn’t take long for the entrepreneurs to get on board. And so, playing off the original name and the nature of cannabis, Mind Tricks was born.

Although Mind Tricks toffee is designed to be a recreational product, Perez says she and Glade are open to creating medically-minded products in the future.

“Our goal was to do what we’ve always done,” Perez said. “We’ve got this killer candy recipe. Let’s get our foot in the door.”

Though using, possessing and transporting cannabis is illegal at the federal level, more than half of U.S. states and Washington, D.C. allow use of medicinal marijuana. In addition, several states have lessened sanctions for being caught with it illegally.

But after a handful of ballot referenda last year, eight states — Alaska, California, Colorado, Maine, Massachusetts, Nevada, Oregon and Washington — have legalized the recreational use of cannabis.

Shifting attitudes have prompted the legal cannabis products business to explode, reaching $6.7 billion in 2016, according to a report by Arcview Market Research. That’s up 34 percent from 2015, and sales aren’t expected to slow.

Arcview expects sales of legal cannabis products to surpass $22 billion by 2021, with almost two-thirds sales coming from adult recreational use. The remaining third would come from medical use.

While smoking dried flowers is the most recognized way for consuming marijuana, edibles continue to gain popularity. Citing its “Marijuana Business Factbook,” Marijuana Business Daily said the market for general marijuana-infused products pulled in between $650 million and $850 million in 2014, with the majority of those sales coming from edibles.

And it’s not just cookies or the fabled pot brownies. Companies producing cannabis-infused candy continue to capitalize on the blossoming market.

Kristi Knoblich Palmer, coo of Hayward, Calif.-based Kiva Confections, said edibles suit consumers looking for the benefits of cannabis but not the “drawbacks.”

“Edibles can be used on the go, they don’t require fancy equipment to consume and don’t leave you smelling like you just left a reggae concert,” she said. “They also offer consistent THC (Tetrahydrocannabinol) potency, so people can get exactly the amount they’re looking for without over or underconsuming.”

Kiva Confections produces chocolate bars with both THC, a cannabinoid, or chemical compound, responsible for a psychoactive response, and Cannabidiol (CBD), a cannabinoid that doesn’t elicit a psychoactive response but has anti-seizure and anti-inflammatory properties. Kiva also makes cannabis-infused chocolate bites and Petra mints, each containing a microdose (2.5 grams) of THC.

Knoblich Palmer said Kiva’s customers have “active lifestyles” that may prevent them from experimenting with products to help them fall asleep or deal with pain.

“They want a consistent product that puts them in control of their experience,” she said. “They care about what they put into their bodies, so taste and premium ingredients are an integral part of the edible experience, too. We’re also learning more and more people are sharing their products with friends and family, so that they want something that looks presentable and sophisticated, too.”

Eric Leslie is marketing director for Colorado-based Cheeba Chews, which produces cannabis-infused chocolate taffy, as well as gummies under the brand Green Hornet. He also noted the diversity of edibles consumers.

“The beautiful thing about consumers of Cheeba Chews is that they come from a wide-ranging demographic, from veterans battling Post Traumatic Stress Disorder to mothers looking to de-stress after a long day,” he said. “We all have unique reasons and needs for cannabis, and it’s truly remarkable how many people can actually benefit from consuming it.”

With the diversity of users, it’s not surprising that edibles affect consumers in varying ways. That’s where dosing and packaging come in. The regulatory process is at different stages in each state, but manufacturers stress responsibility in those areas.

Perez said Mind Tricks will package its toffee in opaque, windowless bags without images so they aren’t at all appealing to children. Meanwhile, Knoblich Palmer said Kiva Confections has also implemented its own best manufacturing processes, which include labeling products with THC content, warnings and instructions for having a “positive, controlled experience.”

Leslie also underscored the importance of safe use, particularly since cannabis-infused edibles affect the body differently than inhaling cannabis. In Colorado, where regulations for cannabis-infused products are the most developed, Leslie said, recreational edibles must come in child-resistant packaging and stamped or labeled with a “! THC” symbol. There’s also a 100-milligram limit on cannabinoid content in recreational packages.

“Rules and regulations are continually evolving, and our ability to remain agile and responsive are the main reasons we’re able to exist in this highly regulated market,” Leslie said.

No matter what the states decide, the federal government is still hanging overhead. And with the newest administration, it’s possible Uncle Sam’s laissez-faire attitude toward the state legalization of recreational cannabis use could change. Knoblich Palmer said “making safe products, paying taxes and focusing on changing the stigma around cannabis” is the industry’s best bet.

“The more people realize the benefits of cannabis — and now the majority of the population in the U.S. lives in a state with medical or recreational cannabis — the more pressure the federal government will feel to reschedule, tax and regulate it,” she said.