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.
@bdebeltran25/react-floating-whatsapp
Advanced tools
Simple React Component for adding a floating WhatsApp button to your project.
Simple react component for adding a floating WhatsApp button to your project.
npm i react-floating-whatsapp
yarn add react-floating-whatsapp
height
prop to chatboxHeight
styles
prop to style
notificationDelay
now in seconds instead of millisecondimport React from 'react'
import { FloatingWhatsApp } from 'react-floating-whatsapp'
export default function App() {
return (
<FloatingWhatsApp {/* Props */} />
)
}
Prop | Type | Options | Description | Default |
---|---|---|---|---|
phoneNumber | String | Required | Phone number in intenational format | 1234567890 |
accountName | String | Required | Account username | Account Name |
onClick | Function | Optional | Callback function fires on click | - |
onSubmit | Function | Optional | Callback function fires on submit with event and form input value passed | - |
onClose | Function | Optional | Callback function fires on close | - |
onLoopDone | Function | Optional | Callback function called when notification loop done | - |
onNotification | Function | Optional | Callback function fired when notification runs | - |
avatar | String | Optional | Change user avatar using static assets | UI Face |
statusMessage | String | Optional | Text below the account username | Typically replies within 1 hour |
chatMessage | String | Optional | Text inside the chat box. | Hello there! 🤝 \nHow can we help? |
placeholder | String | Optional | Input placeholder. | Type a message.. |
messageDelay | Number | Optional | Time delay after which the chatMessage is displayed (in seconds). | 2 |
darkMode | Boolean | Optional | Dark style. | false |
allowClickAway | Boolean | Optional | Closes the chat box when user clicks outside | false |
allowEsc | Boolean | Optional | Closes the chat box when Escape key is pressed | false |
className | String | Optional | CSS className applied to the main wrapping Div | floating-whatsapp |
buttonClassName | String | Optional | CSS className applied to button | floating-whatsapp-button |
style | CSSProperties | Optional | Inline style applied to the main wrapping Div | {} |
buttonStyle | CSSProperties | Optional | Inline style applied to button | {} |
chatboxHeight | Number | Optional | Control chat box height | 320 |
chatboxClassName | String | Optional | CSS className applied to chat box | floating-whatsapp-chatbox |
chatboxStyle | CSSProperties | Optional | Inline style applied to chat box | {} |
notification | Boolean | Optional | Allow notifications (Disabled after user open the chat box) | false |
notificationDelay | Number | Optional | Time delay between notifications in seconds | 60 |
notificationSound | Boolean | Optional | Allow notification sound | false |
notificationSoundSrc | String | Optional | Notification sound custom src | - |
notificationLoop | Number | Optional | Repeat notifications loop | 0 |
notificationStyle | CSSProperties | Optional | Inline style applied to notification | - |
notificationClassName | String | Optional | CSS className applied to notification indicator | floating-whatsapp-notification |
MIT © awran5
FAQs
Simple React Component for adding a floating WhatsApp button to your project.
We found that @bdebeltran25/react-floating-whatsapp 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.