Thanks all!

Just gravity Dave, but the lids are a close fit and rub the sides a bit. Enough friction to keep them closed if inverted.

I was considering dipping into my stash of tiny magnets, but then I be still futzing with them.