npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

avena-whatsapp-widget

v1.0.8

Published

A beautiful and customizable WhatsApp chat widget for React applications

Readme

WhatsApp Widget

A beautiful and customizable WhatsApp chat widget for React applications.

Features

  • 🎨 Fully customizable appearance
  • 📱 Responsive design
  • ⚡ Smooth animations
  • 🔄 Exit intent detection
  • 🎯 Event tracking
  • 💬 Customizable chat messages
  • 🌈 TypeScript support

Installation

npm install avena-whatsapp-widget
# or
yarn add avena-whatsapp-widget

Usage

Import the Component and CSS

import { WhatsAppWidget } from 'avena-whatsapp-widget';
import 'avena-whatsapp-widget/dist/whatsapp-widget.css';

function App() {
  return (
    <WhatsAppWidget 
      phoneNumber="1234567890"
      companyName="Your Company"
      responseTime="We usually respond in a few minutes"
      messages={["Hello! 👋", "How can we help you?"]}
    />
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | phoneNumber | string | | Required. WhatsApp number in international format (e.g., "1234567890") | | companyName | string | "Natalia de Avena Health" | Company or person name displayed in the header | | responseTime | string | "Tipicamente respondemos en minutos" | Response time message displayed under the name | | avatar | string | undefined | URL to the avatar image | | messages | string[] | ["¡Hola!"] | Array of messages to display in the chat | | defaultMessage | string | "¿Estás pensando en contratar Avena y tienes dudas?" | Default message to send when clicking the WhatsApp button | | enableExitIntent | boolean | true | Whether to enable exit intent detection | | exitIntentSensitivity | number | 20 | Sensitivity for exit intent detection in pixels from top | | onOpen | function | undefined | Callback when chat window opens | | onClose | function | undefined | Callback when chat window closes | | onRedirect | function | undefined | Callback when WhatsApp redirect button is clicked | | className | string | "" | Custom class name for the widget container | | showNotification | boolean | true | Whether to show the notification dot | | style | object | {} | Custom styles for the widget |

Customization

The widget is designed to be customizable. You can override any of the styles defined in the CSS:

/* Example overrides */
.avena-whatsapp-button {
  background-color: #128C7E; /* Darker WhatsApp green */
}

.avena-whatsapp-chat-header {
  background-color: #075E54; /* Dark WhatsApp green */
}

Example

We've included a comprehensive example in the example directory that demonstrates the WhatsApp Widget integrated into a simple landing page. This example shows how to:

  • Import and initialize the component
  • Configure various props
  • Customize the appearance
  • Handle callbacks

To run the example:

cd example
npm install
npm start

Then open your browser to http://localhost:1234

Development

  1. Clone the repository
  2. Install dependencies: npm install
  3. Start development: npm run dev
  4. Build: npm run build

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT