Skip to content
Mcdavid Obioha edited this page Dec 2, 2026 · 3 revisions

WhatsApp Chat Widget for React

A floating contact form for React 18 and 19. Visitors fill in a name, subject and message, and the widget opens a draft in WhatsApp for them to review and send. No backend, no WhatsApp API key, no runtime dependencies.

import { WhatsAppChat } from 'whatsapp-chat-widget-react';

<WhatsAppChat phoneNumber="+12025550123" />

Where to go next

I want to... Read
Install it and see it working Getting Started
Look up a prop Props Reference
Let visitors pick a person or department Agents and Business Hours
Know which page or campaign a lead came from Page Context and Attribution
Change colors, size, position or theme Styling and Theming
Support Arabic, Hebrew or another language Right-to-Left and Translations
Open it from my own button, delay it, or hide it on some pages Controlling the Widget
Control it from any component, or open it with a pre-filled draft Widget Hook and Provider
Let visitors chat inside the widget Live Chat
Add AI: polish messages, route to the right agent, answer FAQs Bring Your Own AI
Save leads even if they never send the WhatsApp message Lead Webhooks
Use it on WordPress, Webflow, Shopify or plain HTML Script-Tag Build
Copy a Claude, OpenAI, Cloudflare or n8n backend Backend Recipes
See everything it can do Features
Use it with Next.js, Vite or Remix Framework Guides
Copy a working example Recipes
Fix something that is not working Troubleshooting and FAQ
Check accessibility details Accessibility
Contribute or cut a release Contributing and Releasing

How it works

  1. The visitor clicks the launcher and fills in the form.
  2. The widget builds the message text (name, subject, message, and optionally a page-context footer).
  3. It opens https://wa.me/<number>?text=<encoded text> in a new tab. WhatsApp shows the draft and the visitor presses send.

By default the widget never sends the message itself and never stores or transmits form data. It does not use the WhatsApp Business API. Everything that involves a server (live chat, AI, lead webhooks) is optional, off by default, and talks only to endpoints you provide.

This project is not affiliated with WhatsApp. Licensed under MIT.

Clone this wiki locally