Overview
Flutter offers five levels of haptic feedback, each suited to different UI actions. These help reinforce actions and improve the sense of physicality in digital interfaces.
|
Feedback |
Description |
|---|---|
|
vibrate |
A short, generic buzz suitable for general notifications or alerts. |
|
lightImpact |
A gentle tap sensation, ideal for minor confirmations or UI interactions. |
|
mediumImpact |
A more pronounced tap, appropriate for significant |
|
|
fan actions or transitions. |
|
heavyImpact |
A deep, strong bump, best used for critical confirmations or alerts. |
|
selectionClick |
A subtle tick, useful for indicating movement through discrete selections. |
Behaviour
1. Vibrate
Description:
- A short, generic buzz suitable for general notifications or alerts.
Example Use Case:
- When a fan receives an error after submitting a form.
- When a timer finishes.
2. Light Impact
Description:
- A gentle tap sensation, ideal for minor confirmations or UI interactions.
Use Case:
- Tapping a button or icon.
- Opening or closing an accordion section.
- Sending a reaction in a chat.
3. Medium Impact
Description:
- A more pronounced tap, appropriate for significant fan actions or transitions.
Use Case:
- Adding an item to a shopping cart.
- Expanding a modal or bottom sheet.
- Completing a drag-and-drop action.
4. Heavy Impact
Description:
- A deep, strong bump, best used for critical confirmations or alerts.
Use Case:
- Long-pressing to initiate a drag.
- Confirming deletion of an item.
- Locking/unlocking secure content.
5. Selection Click
Description:
- A subtle tick, useful for indicating movement through discrete selections.
Use Case:
- Scrolling through a picker or dropdown.
- Moving a slider that snaps to set intervals.
- Selecting a date or time.
Accessibility
Haptic feedback can enhance accessibility by providing non-visual cues for fans with visual or auditory impairments. It should be used consistently and meaningfully, ensuring that feedback complements the UI without overwhelming the fan.