The door on the dryer in our coach (yes, we have a washer and dryer) tends to swing closed when open. So I attached a couple of strong magnets to the cupboard and dryer doors to keep it open.
Here are the magnets I used:
I attached them to the doors with Glue Dots:
I do have magnets with self-adhesive backs, but they aren’t as powerful, and I need opposite polarities for each magnet so they stick together, so using the glue dots on the magnets works better:
A magnet on the dryer door:
And a magnet on the enclosing cupboard door:
They meet and hold the door open: