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

react-whatsapp-button

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-whatsapp-button

A simple react component to show a Whatsapp floating button.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
91
increased by85.71%
Maintainers
1
Weekly downloads
 
Created
Source

React Whatsapp floating button

A simple react component to show a Whatsapp floating button.

With a custom style

Content

Features ✨

  • Fast.
  • Lightweight.
  • Easy to use.
  • Good for all kind of projects.

Install 🐙

You can install react-whatsapp-button by entering this command

npm i react-whatsapp-button

Usage 💡


import React from "react";
import ReactWhatsappButton from "react-whatsapp-button";

function App() {
  return (
    <div className="App">
      <ReactWhatsappButton
        countryCode="51"
        phoneNumber="987654321"
      />
    </div>
  )
}

export default App;

Examples 🖍

With an animation

With an animation


import React from "react";
import ReactWhatsappButton from "react-whatsapp-button";

function App() {
  return (
    <div className="App">
      <ReactWhatsappButton
        countryCode="51"
        phoneNumber="987654321"
        animated
      />
    </div>
  )
}

export default App;

With a custom style

With a custom style


import React from "react";
import ReactWhatsappButton from "react-whatsapp-button";

function App() {
  return (
    <div className="App">
      <ReactWhatsappButton
        countryCode="51"
        phoneNumber="987654321"
        style={{
            backgroundColor: "#00a4f5",
            right: "unset",
            left: "10px",
        }}
      />
    </div>
  )
}

export default App;

You can try all the variations here: https://react-whatsapp-button.vercel.app/?path=/story/whatsapp-button--default

Props 🤖

AttributeTypeDefaultRequiredDescription
countryCodestring""yescountry code without +. Example: 51
phoneNumberstring""yesPhone Number
messagestring""noCustom message
animatedbooleanfalsenoAdd an animation to the button
callbackfunction() => {}noAdd a callback function to the button
styleobject{}noModify the default style with a custom object

Contributing 🍰

Feel free to add a new pull request to improve this amazing package.

Thank you to all the people who already contributed to this project!

Maintainers 👷

Kevin Riveros
Kevin Riveros

💻

License ⚖️

MIT

Keywords

FAQs

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