Documentation

Quick Start

Add one script tag to your HTML. That's it.

<script
  src="https://unpkg.com/kleenchat/widget.js"
  data-whatsapp="https://wa.me/1234567890"
  data-slack="https://join.slack.com/..."
  defer>
</script>

The widget auto-detects channels from data-* attributes and shows the correct icons.

Supported Channels

Add any combination of these as data-{channel}="{url}" attributes:

ChannelAttributeExample URL
WhatsAppdata-whatsapphttps://wa.me/1234567890
Slackdata-slackhttps://join.slack.com/...
LinkedIndata-linkedinhttps://linkedin.com/in/you
Telegramdata-telegramhttps://t.me/username
Emaildata-emailmailto:hello@example.com
Messengerdata-messengerhttps://m.me/pagename
Xdata-xhttps://x.com/handle
Discorddata-discordhttps://discord.gg/invite
Calendlydata-calendlyhttps://calendly.com/you

Customization

For advanced configuration, set window.kleenchat before loading the script:

<script>
  window.kleenchat = {
    heading: "Chat with us ✌️",
    subtitle: "Pick your platform",
    fabHeading: "Need help?",
    fabSubtitle: "Real person here 👋",
    avatars: ["avatar1.jpg", "avatar2.jpg"],
    ctaLabel: "Book a demo",
    ctaUrl: "https://cal.com/you",
    theme: { primaryColor: "#6366f1" },
  };
</script>
<script src="https://unpkg.com/kleenchat/widget.js"
  data-whatsapp="https://wa.me/123" defer></script>

Config Options

OptionTypeDefaultDescription
headingstring"Chat with us"Modal heading text
subtitlestring"Pick your preferred channel"Modal subtitle
fabHeadingstring"Need help?"Floating button heading
fabSubtitlestring"We typically reply in minutes"Floating button subtitle
avatarsstring[][]URLs of avatar images to display
ctaLabelstringCTA button text (optional)
ctaUrlstringCTA button link (optional)
theme.primaryColorstring"#6366f1"Primary accent color

Self-hosting

You can self-host the widget instead of using unpkg:

npm install kleenchat

Then copy node_modules/kleenchat/dist/widget.js to your static files and reference it directly.