Skip to content

veebull/tma-haptic-feedback

Repository files navigation


logo of telegram web apps

Telegram Mini Apps(TMA) Haptic Feedback Demo

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.

Features

  • 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

Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • A Telegram account

Installation

# 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

Development

# Start development server with npm
npm run dev --host

# Or using yarn
yarn dev --host

Usage

  1. Open the demo in Telegram Mini Apps
  2. Try different haptic feedback patterns:
    • Single impacts for immediate feedback
    • Complex sequences for more elaborate patterns
  3. Experience different intensities and patterns
  4. Use these patterns as reference for your own TWA implementations

Technical Details

  • 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

Links

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

A haptic feedback implementation for TMA applications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •