To gift these, I recommend leaving the top unattached, and securing it with a ribbon around the box. It’s cute and festive, and also makes it easy for people to open the box and get to the goodies inside! But if you’ll be mailing them or are otherwise worried about stability, you can always attach the tops with a bit of melted chocolate.