# React Telegram ⚛️🤖
Build interactive Telegram bots using React components! This monorepo contains packages for creating Telegram bots with familiar React patterns, state management, and full TypeScript support.
[](https://github.com/lockin-bot/react-telegram/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/@react-telegram/core)
[](https://www.typescriptlang.org/)
[](https://react.dev/)
[](https://bun.sh/)
## 📦 Packages
### [@react-telegram/core](./packages/core)
Core React reconciler for building Telegram bot interfaces. Translates React components into Telegram message structures.
### [@react-telegram/mtcute-adapter](./packages/mtcute-adapter)
MTCute adapter that connects the React reconciler with the Telegram Bot API.
### [Examples](./packages/examples)
Complete example bots demonstrating various features and patterns.
## 🚀 Installation
```bash
# Using bun (recommended)
bun add @react-telegram/core @react-telegram/mtcute-adapter
# Using npm
npm install @react-telegram/core @react-telegram/mtcute-adapter
# Using yarn
yarn add @react-telegram/core @react-telegram/mtcute-adapter
```
## ✨ Features
- **React Components**: Write bot interfaces using familiar React syntax
- **State Management**: Full React state with `useState`, `useEffect`, and hooks
- **Interactive Elements**: Buttons with onClick handlers, text inputs
- **Rich Formatting**: Bold, italic, code blocks, spoilers, links, and more
- **Message Updates**: Automatic message editing when state changes
- **TypeScript Support**: Full type safety with autocompletion
- **Line Breaks**: Use ` ` tags for clean formatting
## 🖼️ Screenshots
Counter Bot - Interactive counter with increase/decrease buttons
Text Formatter - Demonstrates all text formatting capabilities
Calculator - Fully functional calculator with button grid
Tetris - Playable Tetris game with controls
React Router - Navigation example with MemoryRouter