JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2377
  • Score
    100M100P100Q119355F
  • License MIT

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

Package Exports

  • react-floating-whatsapp

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-floating-whatsapp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

Usage

import React from 'react'
import FloatingWhatsApp from 'react-floating-whatsapp'
import 'react-floating-whatsapp/dist/index.css'

export default function App() {

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

Props

Prop Type Options Description Default
phoneNumber String Required Phone number in intenational format 1234567890
accountName String Required Account username Account Name
avatar String Optional change user avatar using static assets -
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?
darkMode boolean Optional Dark style. true if present false
styles CSSProperties Optional Inline style applied to the Button only -
className className Optional CSS className applied to the main Div -

Edit react-floating-whatsapp

License

MIT © awran5