I started with a piece of scrap wood and screwed to it three magnets that I salvaged from a couple of old hard drives. Each hard drive has two magnets like this inside.
I put a kitchen cabinet handle on the front to make it easier to remove.
The magnets are very strong and easily hold the door shut as the sneakers and clothes tumble inside. If you are worried about the finish of your dryer add a layer of cloth tape over the face of each magnet to protect it.