A
lighting system including modules containing LEDs or other electroluminescent devices and loosely constrained magnetic structures at least partially contained within cavities in the module substrate that are connected to fixtures under magnetic force. The loosely constrained magnetic structures accommodate mechanical variations in the
system and provide a method to connect modules mechanically, electrically and thermally to different fixtures or positions in fixtures without tools. The relatively
short distance separating magnetic structures provides high connection forces with the use of relatively small magnets. Magnets and
electrical contacts are not located directly between the LED subassembly and the fixture, which provides higher
thermal conductivity pathways to remove heat from the LEDs. Biasing members may be used to increase
thermal contact. Magnetic structures may, but are not required, to conduct
electricity. Fixtures that attach to modules include rails, sockets, heat sinks and two-dimensional structures with recessed electrodes for improved electrical safety.