Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
react-telegram-comments
Advanced tools
A simple React component/librarty to integrate comments using Telegram's comments.app
A really simple React component/library to allow website visitors to comment and interact with others using their Telegram's account.
References:
The main motivation for this component is to a provide a lightweight alternative to Discord (and similar services) to handle comments in websites.
See it in action!:
Created by Telegram :blue_heart:
Sign-up to comments.app, add your site and get a valid Site ID for your domain.
Add the component package to your project with yarn add react-telegram-comments
or npm install react-telegram-comments
.
Import the component in your pages or components:
import { TelegramComments } from "react-telegram-comments";
Add TelegramComments
to your component or page:
const Comments = () => <TelegramComments websiteKey={websiteKey} />;
export default Comments;
Important: Have in mind that for the moment the widget doesn't work with local domains. You'll need to publish your website to see it in action.
commentsNumber
{number} optional The number of comments to display (5
)containerClassName
: {string} optional The components main container class ("telegram-comments"
)customColor
{string} optional Highlight color, hex value without # (null
)customHeight
{number} optional Custom widget height in pixels (null
)onLoad
: {} optional Callback function to be executed when the external script is loadedpageId
{string} optional Unique identifier of the page. Page URL by default (null
)showColorfulNames
{boolean} optional Use different color for usernames (false
)showDislikes
{boolean} optional Add the dislike option for comments (true
)showIconOutlines
{boolean} optional Display outlined icons (false
)useDarkMode
{boolean} optional Use dark theme (false
)websiteKey
: {string} required The Site IDwrapperClassName
: {string} optional The inner wrapper class, in case you need another one (E.g. "telegram-comments__wrapper"
)<TelegramComments
commentsNumber={3}
containerClassName="awesome-comments"
customColor="663399"
customHeight="450"
isDark
onLoad={() => console.log("Comments loaded!")}
pageId="about-page"
showColorfulNames
showDislikes
showIconOutlines
websiteKey={process.env.COMMENTS_APP_KEY}
wrapperClassName="awesome-comments__wrapper"
/>
tsc
only.isDark
prop renamed to useDarkMode
(only breaking change from v1)onLoad
callback propProudly made in :argentina:
FAQs
A simple React component/librarty to integrate comments using Telegram's comments.app
We found that react-telegram-comments demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.