Skip to main content

Examples

Real-world examples showing how to implement common use cases with DialogKit ChatBox SDK.

Use Cases

Quick Examples

Basic Chat Widget

Minimal setup for a simple chat widget:

<script
src="https://cdn.dialogkit.io/chatbox-sdk.min.js"
data-api-key="YOUR_API_KEY"
></script>

Lead Capture Form

Conversational lead generation with context:

new ChatBoxSDK({
apiKey: 'YOUR_API_KEY',
context: {
source: 'landing-page',
campaign: window.location.search,
pageUrl: window.location.href
}
});

E-commerce Support

Product-specific support with order tracking:

new ChatBoxSDK({
apiKey: 'YOUR_API_KEY',
context: {
productId: getCurrentProductId(),
cartTotal: getCartTotal(),
userId: getCurrentUserId()
}
});

Custom Branded Widget

Match your brand with custom theming:

new ChatBoxSDK({
apiKey: 'YOUR_API_KEY',
position: 'bottom-left',
theme: {
primaryColor: '#FF6B6B',
fontFamily: 'Poppins, sans-serif',
borderRadius: '20px',
mode: 'light'
}
});

Next Steps