Home/ Templates/ Astro chat widget

Astro Chat Widget — Zero-JS-Overhead Live Chat

One line in your BaseLayout. No Islands architecture conflicts, no client:load directive needed.

◈ WHAT IS KNOCKET

Knocket is a free Astro chat widget widget — no plugin, no app, just one line of JavaScript. It's free forever with no ads, and includes a unified inbox for Live Chat, Telegram, and Email. Every visitor message pings your Telegram — quote-reply from your phone and it lands back on the visitor's page.

Start Free 100% free ✿
Knocket live chat widget in an Astro website

How to add Knocket to Astro

One tag in your shared layout — ships in the built HTML, zero client-side cost.

  1. Copy your install snippet. Sign up free, open the Knocket console, and copy the snippet from the Installation page — it already contains your own identifier.
  2. Open your base layout. Usually src/layouts/BaseLayout.astro — the layout every page extends.
  3. Paste it just before </body>.
    <script src="https://trtc.io/knocket-sdk/sdk.js?identifier=YOUR_IDENTIFIER" async></script>
  4. Build and check. Run npm run dev — the chat bubble appears in the bottom-right corner. Send yourself a test message and confirm it reaches your Telegram.
◈ ASTRO-SPECIFIC GOTCHAS
  • Astro renders at build time — the snippet only reaches visitors after you rebuild and redeploy.
  • With View Transitions enabled, scripts do not re-run on navigation. Either add data-astro-reload to the script, or keep the tag outside the transitioned area.
  • A bare <script is:inline> in a component stays where you put it; a non-inline one gets bundled by Vite. Use is:inline for a plain CDN script.

Why people search for a astro chat widget

Best for: Astro developers, documentation sites, static-site builders, bloggers.

Knocket vs Intercom vs Chatwoot

Feature Knocket Intercom Chatwoot
Free forever✓——
No ads on your page✓——
Unified inbox (Live Chat, Telegram, and Email)✓——
Telegram push notifications✓——
Shareable contact page✓——
One-line install / no code✓——
Knocket is 100% free with no ads. Intercom charges per seat or gates key features behind paid plans, while Chatwoot is limited to basic functionality without a unified multi-channel inbox. Knocket includes live chat, a shareable contact page, and a unified inbox for Live Chat, Telegram, and Email — all free.

Frequently asked questions

What is a free astro chat widget?

Knocket is a free astro chat widget — a lightweight contact layer for indie developers, small teams, and anyone who needs to add a chat button or contact page without enterprise complexity. Visitors message you in real time; you reply from the Knocket inbox or directly from Telegram.

How do I add a chat widget to my Astro site?

Open your BaseLayout.astro and add the Knocket script tag before </body>. Use a plain <script async> tag — no client:load directive needed. All pages using this layout get the widget automatically, including Markdown content pages.

Is Knocket really free, or are there hidden fees?

Yes. Knocket is 100% free forever — no hidden fees, and no ads on your site. It's a strong alternative to Intercom (which charges per seat) and Chatwoot (which gates key features behind paid plans). You get live chat, a shareable contact page, and a unified inbox for Live Chat, Telegram, and Email — all free.

Can I customize the appearance to match my brand?

Yes. From the Knocket console you can customize the theme color, welcome message, language, offline message, social media links, and meeting booking link. The widget adapts to both desktop and mobile automatically. For Contact Page you can also set the card background, text color, dark/light mode, border style, avatar, and bio.

How do I get notified when visitors send messages?

Knocket sends instant Telegram push notifications and email notifications whenever a visitor sends a message. The full message content appears in the Telegram notification — just quote-reply in Telegram and your response is delivered back to the visitor in real time. No dashboard to open, no tab to switch.

Related templates

Get your Astro chat widget.

60 seconds. No card. Free forever.

Start Free
English
EspañolPortuguês简体中文繁體中文FrançaisDeutschItalianoNederlandsРусскийPolskiTürkçeहिन्दीBahasa Indonesia日本語한국어Tiếng Việtไทย