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

react-floating-whatsapp-skolmi-dev-1

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-floating-whatsapp-skolmi-dev-1

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

  • 1.0.0
  • 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

Changes

  • Added: Default Avatar using generated random avatars
  • Added: New Prop height that allow to control the chat box height.
  • Added: New Prop notification that enable/disable repeated notifications sound and indicators.
  • Added: New Prop notificationDelay to set the time delay between notifications in millisecond.
  • Added: New Prop notificationSound to allow notifications sound.
  • Added: Message typing effect before chatMessage appears.
  • Fixed: Chat box css position Thanks to @jpmedeirosmorais and @jorgemndoza
  • Modified: Refactor state using useReducer Hook.
  • Modified: Prevent toggle open/close the chat box.
  • Modified: CSS stylesheet import, now its applied inline.
  • Updated: App dependencies
  • Added defaultMessage prop to allow for a prefilled message.

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
avatarStringOptionalChange user avatar using static assetsUI Faces
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..
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 Divcustom-class
stylesCSSPropertiesOptionalInline style applied to the Button only{}
heightNumberOptionalControl chat box height300
notificationBooleanOptionalAllow repeated notifications (Disabled after user opens the chat box)false
notificationDelayNumberOptionalTime delay between notifications in millisecond18000
notificationSoundBooleanOptionalAllow notification soundfalse
defaultMessageStringOptionalA default prefilled message.Hello, I have a query

Edit react-floating-whatsapp

License

MIT © awran5

Keywords

FAQs

Package last updated on 04 May 2022

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