Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-floating-whatsapp2

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-floating-whatsapp2

Simple React Component for adding a floating WhatsApp button to your project. with some additional functionality

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
31
increased by158.33%
Maintainers
1
Weekly downloads
 
Created
Source

React Floating Whatsapp2

Simple react component for adding a floating WhatsApp button to your project.

NPM npm bundle size GitHub

screenshot

Install

npm
npm i react-floating-whatsapp2
Yarn
yarn add react-floating-whatsapp2

Usage

import React from 'react'
import { FloatingWhatsApp } from 'react-floating-whatsapp2'

export default function App() {

  return (
      <FloatingWhatsApp {/*  Props  */} />
  )
}

Props

PropTypeOptionsDescriptionDefault
phoneNumberStringRequiredPhone number in intenational format1234567890
accountNameStringRequiredAccount usernameAccount Name
onClickFunctionOptionalCallback function fires on click-
onSubmitFunctionOptionalCallback function fires on submit with event and form input value passed-
onCloseFunctionOptionalCallback function fires on close-
onLoopDoneFunctionOptionalCallback function called when notification loop done-
onNotificationFunctionOptionalCallback function fired when notification runs-
avatarStringOptionalChange user avatar using static assetsUI Face
statusMessageStringOptionalText below the account usernameTypically replies within 1 hour
chatMessageStringOptionalText inside the chat box.Hello there! 🤝 \nHow can we help?
placeholderStringOptionalInput placeholder.Type a message..
messageDelayNumberOptionalTime delay after which the chatMessage is displayed (in seconds).2
darkModeBooleanOptionalDark style.false
openChatOnClickBooleanOptionalopen the chat box if clicked on whatsApp icontrue
allowDefaultSubmitBooleanOptionalAllow default submit behavior of redirecting to whatsApp on submittrue
allowClickAwayBooleanOptionalCloses the chat box when user clicks outsidefalse
allowEscBooleanOptionalCloses the chat box when Escape key is pressedfalse
classNameStringOptionalCSS className applied to the main wrapping Divfloating-whatsapp
buttonClassNameStringOptionalCSS className applied to buttonfloating-whatsapp-button
styleCSSPropertiesOptionalInline style applied to the main wrapping Div{}
buttonStyleCSSPropertiesOptionalInline style applied to button{}
chatboxHeightNumberOptionalControl chat box height320
chatboxClassNameStringOptionalCSS className applied to chat boxfloating-whatsapp-chatbox
chatboxStyleCSSPropertiesOptionalInline style applied to chat box{}
notificationBooleanOptionalAllow notifications (Disabled after user open the chat box)false
notificationDelayNumberOptionalTime delay between notifications in seconds60
notificationSoundBooleanOptionalAllow notification soundfalse
notificationSoundSrcStringOptionalNotification sound custom src-
notificationLoopNumberOptionalRepeat notifications loop0
notificationStyleCSSPropertiesOptionalInline style applied to notification-
notificationClassNameStringOptionalCSS className applied to notification indicatorfloating-whatsapp-notification

Edit react-floating-whatsapp2

Credits

awran5

i forked this project because owner is inactive from last many months also need some extra functionality and more stability

License

MIT © AdarshHatkar

Keywords

FAQs

Package last updated on 16 Aug 2023

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