How do I make my dome light fade away when you shut the door?

find a 12v capacitor, the bigger it is the longer the light will stay on, maybe radio shack will have something the right size. Take apart an old radio maybe you can rob one from there.