New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-telegram-chatbox

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-telegram-chatbox

Chat widget connected to your Telegram account for instant messaging into your React website

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-telegram-chatbox

Chat widget connected to your Telegram account for instant messaging into your React websites. It uses react-chat-widget for the UI and telegram-socket-bot for the connection to Telegram.

Install

npm i react-telegram-chatbox

or

yarn add react-telegram-chatbox

Usage

  1. Follow this link and type /start to sign up to TgSocketBot from your Telegram account and get your access token.
  2. Install & import the library. Remember to include the styles from react-chat-widget/lib/styles.css
  3. Put your token into the token attribute of Chatbox component
import { Chatbox } from "react-telegram-chatbox";
import "react-chat-widget/lib/styles.css";

const App = () => {
    const token = 'YourAccessToken';

    return <Chatbox token={token} />;
};

  1. See and star telegram-socket-bot to know how to reply to users, allow hostnames to use your token and for recommendations about security and usage.

API

Attributetypedefaultdescription
tokenstringundefinedToken generated by TgSocketBot
welcomeMessage?stringundefinedSend a first message on chatbox creation
welcomeMessageDelay?number0Delay for the welcome message
errorMessage?string'Cannot connect to server'Message to be sent if the connection cannot be established
widgetProps?WidgetPropsundefinedProps for react-chat-widget

Compatibility

It support cjs and es modules. Typescript declarations available. Compatible with React ^16.0.0.

Dependencies

  • react-chat-widget: >=3.0.5
  • socket.io-client: >=3.1.2

Peer dependencies

  • react: ^16.0.0
  • react-dom: ^16.0.0

License

MIT @ Jonathan Mataloni

FAQs

Package last updated on 10 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc