Neodymium is the perfect material for these applications as it gives a high magnetic strength to size ratio, hence a small magnet can be used in applications where space is limited. The countersunk hole in the magnet can accommodate anything from M3 to M5 screw head size depending on the magnet size.
eBay