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

@bdebeltran25/react-floating-whatsapp

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bdebeltran25/react-floating-whatsapp

Simple React Component for adding a floating WhatsApp button to your project.

  • 5.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Floating Whatsapp

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

NPM npm bundle size GitHub

screenshot

Install

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

v5.0.0 - 2022-10-07

  • BREAKING CHANGES: change default import to name import
  • BREAKING CHANGES: rename height prop to chatboxHeight
  • BREAKING CHANGES: rename styles prop to style
  • BREAKING CHANGES: notificationDelay now in seconds instead of millisecond

Usage

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

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
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-whatsapp

License

MIT © awran5

Keywords

FAQs

Package last updated on 21 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