Knapsack

Widget

Embed Knapsack chatbot in your application

Widget

Integrate the Knapsack chatbot directly into your web application with our embeddable widget component.

Features

  • Floating Widget: Add a chat bubble that users can click to open
  • Embedded Component: Integrate chat directly into your page layout
  • Customizable Styling: Match your brand colors and design
  • Multiple Frameworks: Works with React, Vue, Angular, or vanilla JavaScript
  • Authentication: Secure user authentication with OAuth providers
  • Event Handling: Listen to widget events for custom integrations

Getting Started

import KnapsackWidget from '@knapsack/widget';

const widget = await KnapsackWidget.init({
  container: '#knapsack-widget',
  mode: 'floating',
  accessToken: 'your-access-token'
});

See the Integration Guide for detailed instructions.