We've had an eye on this Vishay sensor for a while - smart, tidy, and small. Thanks to SparkFun for breaking it out so you can use this to measure ambient light, and physical proximity in a single sensor!
The Vishay VCNL4000 is a tidy little IR proximity and ambient light sensor unit, and can detect proximity within a range of about 20cm (7.9"). Proximity data and ambient light level data are collected over an I2C interface.
This breakout board gives you access to the I2C pins, the Vcc pin, GND and the IR+ pin (power supply for the built-in IR emitter). Simply give the board a clean 3.3V power source and give the IR emitter anywhere from 2.5-5V and you'll be able to tell how far you are from an object up to 20cm.