This is a demonstration project showcasing haptic feedback capabilities in Telegram Mini Apps (TMA) using React, TypeScript, and Vite. The app provides a comprehensive library of haptic patterns and effects that can be used to enhance user experience in Telegram Mini Apps.
-
Single Haptic Impacts
- Light, Medium, Heavy impacts
- Rigid and Soft impacts
- Error, Success, Warning notifications
- Selection changed feedback
-
Haptic Sequences
- Pre-configured pattern sequences
- Customizable delays and repetitions
- Multiple categories of haptic patterns
- Node.js (v14 or higher)
- npm or yarn
- A Telegram account
# Clone the repository
git clone https://github.com/veebull/tma-haptic-feedback.git
cd tma-haptic-feedback
# Install dependencies using npm
npm install
# Or using yarn
yarn
# Start development server with npm
npm run dev --host
# Or using yarn
yarn dev --host
- Open the demo in Telegram Mini Apps
- Try different haptic feedback patterns:
- Single impacts for immediate feedback
- Complex sequences for more elaborate patterns
- Experience different intensities and patterns
- Use these patterns as reference for your own TWA implementations
- Built with React + TypeScript + Vite
- Uses @twa-dev/sdk for Telegram Web Apps integration
- Implements all available haptic feedback patterns from Telegram Mini Apps SDK
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.