Quantity   Component name
1 × Threaded rod 1/4-20 nylon because I had it on hand, about 30 mm long. Plain steel would work fine, or even a carriage bolt.
1 × Nut To fit the threaded rod. !/4-20 here, and nylon again because I had it on hand, but steel will be fine
1 × Cup magnet with mounting hole See the photo: A standard magnet type, it's a rare-earth magnet in a steel cup with a countersunk mounting hole through it, typically supplied with a mounting screw. I used Amazon part B09ZX7SXMF. MAGXCENE brand "Neodymium Disc Magnets with Holes in The Center and Magnets with Stainless Screws". I used 16 mm size, which are plenty strong for this application.
1 × Printed base STL file for 16 mm magnet, 1/4-20 threaded rod
1 × Printed nut holder top STL file for 1/4-20 nut