Vibration
To use vibration inside Telegram Mini App you should use Haptic Feedback actions
Haptic Feedback
There are 3 types of vibration inside Telegram Mini App:
Impact Occured
This has 5 different styles of vibration:
Light - indicates a collision between small or lightweight UI objects.
Medium - indicates a collision between medium-sized or medium-weight UI objects.
Heavy - indicates a collision between large or heavyweight UI objects.
Rigid - indicates a collision between hard or inflexible UI objects.
Soft - indicates a collision between soft or flexible UI objects.
Notification Occured
This has 3 different types of vibration:
Error - indicates that a task or action has failed.
Success - indicates that a task or action has completed successfully.
Warning - indicates that a task or action produced a warning.
Selection Changed
This has only one type of vibration. Use it when the user has changed a selection. The Telegram app may play the appropriate haptics.
Last updated