This is a simple spring/ball latch to keep a door closed but not locked. I am using it on a full size door but it is often used on cupboards and cabinet doors.
The trapped nut and the bolt allow adjusting the tension of the spring.
The hardware I used is:
SpringLatch.stl | 635.0KB |