A device has a user interface that generates a haptic effect in response to user inputs or gestures. In one embodiment, the device receives an indication that the user is scrolling through a list of elements and an indication that an element is selected. The device determines the scroll rate and generates a haptic effect that has a magnitude that is based on the scroll rate.