A modular rail adapter that automates latching an adapter to a DIN rail without the need for users to manually latch adapter to a rail. Users simply snap the adapter to the DIN rail in one, continuous movement using a built-in, self-latching catch mechanism. The present adapter eliminates, or greatly reduces the adapter clearance gap to enable a simple, safe, cost effective and user- friendly snap-on mechanism that doesnt require users to remember to latch the accessory being attached to a DIN rail.