How-to guides
Send haptic feedback
Add feedback to a completed action or selection.
Enable haptics
Apply capability setup with internalPlugins.haptics: true:
pnpm add @capacitor/haptics@8.0.2Connect feedback
Call the hook in your component:
const feedback = useHapticFeedback(); // @akshatowo/radical/react| Trigger | Call |
|---|---|
| Success | feedback.success() |
| Selection | feedback.selection() |
| Impact | feedback.light(), .medium(), .heavy(), or .impact("HEAVY") |
| Warning | feedback.warning() |
| Error | feedback.error() |
| Failure handling | Read feedback.failure |
Success does not prove the hardware vibrated.
See Haptics reference.