What Is Haptic Feedback?
Haptic feedback uses vibrations and tactile sensations to communicate information through touch. Modern smartphones have precise linear actuators that create nuanced vibrations far beyond the crude buzzing of early phones. A light tap confirms a selection, a firm thump signals impact, and quick pulses indicate a warning.
Apple's Taptic Engine and Android's amplitude-controlled vibration motors create distinct patterns that users subconsciously associate with specific actions.
Why Haptic Feedback Matters
Haptic feedback serves three purposes. Confirmation tells users their touch was registered without looking at the screen. Communication uses different patterns to convey success, error, or warning. Engagement creates a physical sense of quality and polish that visual feedback alone cannot achieve.
Apps with thoughtful haptic feedback consistently score higher in user satisfaction surveys.
Haptic Types on iOS
UIImpactFeedbackGenerator
Simulates physical impact with five styles:
| Style | Sensation | Use Case |
|---|---|---|
| Light | Gentle tap | Toggle switches, selection changes |
| Medium | Firm press | Button confirmation, snapping to position |
| Heavy | Strong thump | Significant actions, drag-and-drop landing |
| Rigid | Sharp, precise | Alignment snaps, ruler ticks |
| Soft | Dull, rounded | Flexible surfaces, stretchy interactions |
UISelectionFeedbackGenerator
A subtle tick designed for scrolling through discrete values. Used in pickers, sliders snapping to positions, and selection wheels. This is the lightest haptic type available on iOS.
UINotificationFeedbackGenerator
Three distinct patterns for outcomes. Success is a light bounce (payment completed, item saved). Warning is an attention-getting pattern (approaching a limit). Error is a sharp double-tap (failed action, invalid input).
Core Haptics
For advanced use cases, Core Haptics provides complete control over custom sequences of transient (tap) and continuous (buzz) events with precise timing, intensity, and sharpness. Used in games, music apps, and immersive experiences.
Haptic Feedback on Android
HapticFeedbackConstants: Built-in patterns through View.performHapticFeedback() including CONFIRM, REJECT, LONG_PRESS, CONTEXT_CLICK, CLOCK_TICK, and KEYBOARD_TAP.
VibrationEffect (API 26+): Custom patterns with amplitude control. createOneShot for single vibrations, createWaveform for sequences, and createPredefined for standard effects.
Rich Haptics (API 30+): Android 11 introduced GESTURE_START, GESTURE_END, DRAG_START, and more nuanced effects. Android 12+ improved hardware support further.
Important: haptic quality varies significantly across Android devices. Flagship phones from Samsung, Google, and OnePlus have excellent motors. Budget phones may have crude vibration hardware. Always test on multiple devices and provide fallback patterns.
When to Use (and When Not to)
Good use cases: Toggle switches (light impact), pull-to-refresh threshold (selection tick), swipe actions (impact when revealed), drag-and-drop landing, long press menus, payment confirmation (success notification), form validation errors, slider steps, and tab switching.
Bad use cases: Every button tap (overwhelming and quickly annoying), scrolling (continuous haptics are distracting), background events (haptics should respond only to user actions), text input (the system keyboard already handles this), and frequent automated updates like live scores (too repetitive).
Implementation Best Practices
Prepare generators before you need them. On iOS, call prepare() on UIFeedbackGenerator before the expected haptic (for example, when a drag gesture begins). Without preparation, there is a noticeable delay on the first fire.
Respect user settings. Both platforms let users disable haptics. iOS handles this automatically through UIFeedbackGenerator. On Android, check system settings for haptic preferences.
Keep it subtle. The most common mistake is overuse. If everything vibrates, nothing stands out. Reserve strong haptics for significant moments.
Match audio and visual feedback precisely. A button animation must coincide exactly with the haptic pulse. Mismatched timing feels wrong even if users cannot explain why.
Haptic Accessibility
Some users have conditions making vibrations uncomfortable or imperceptible. Never rely solely on haptics for critical information. Always pair with visual and audio feedback. Support users who disable haptics entirely. Consider offering a haptic intensity setting within your app.