Web Chat hosted samples

August 7, 2025 ยท View on GitHub

Here you can find all hosted samples of Web Chat. The source code repository can be found on GitHub.

These samples are connected to MockBot, a bot for testing various features of Web Chat. The source code of MockBot can be found on GitHub.

Samples list

Sample NameDescriptionLink
Migration
00.migration/a.v3-to-v4Demonstrates how to migrate from your Web Chat v3 bot to v4.Migration Demo
Getting started
01.getting-started/a.full-bundleIntroduces Web Chat embed from a CDN, and demonstrates a simple, full-featured Web Chat. This includes Adaptive Cards, Cognitive Services, and Markdown-It dependencies.Full Bundle Demo
01.getting-started/b.minimal-bundleIntroduces the minimized CDN with only basic dependencies. This does NOT include Adaptive Cards, Cognitive Services dependencies, or Markdown-It dependencies.Minimal Bundle Demo
01.getting-started/c.es5-bundleIntroduces full-featured Web Chat embed with backwards compatibility for ES5 browsers using Web Chat's ES5 ponyfill.ES5 Bundle Demo
01.getting-started/d.es5-direct-line-speechDemonstrates how to use Direct Line Speech with ES5 bundle.ES5 Direct Line Speech Demo
01.getting-started/e.host-with-reactDemonstrates how to create a React component that hosts the full-featured Web Chat.Host with React Demo
01.getting-started/f.host-with-angularDemonstrates how to create an Angular component that hosts the full-featured Web Chat.Host with Angular Demo
01.getting-started/h.minimal-markdownDemonstrates how to add the CDN for Markdown-It dependency on top of the minimal bundle.Minimal with Markdown Demo
01.getting-started/i.protocol-direct-line-app-service-extensionDemonstrates how to use Direct Line App Service Extension chat adapterDirect Line App Service Extension Demo
01.getting-started/j.bundle-with-content-security-policyDemonstrates how to embed on a host with Content Security Policy configured.Content Security Policy Demo
01.getting-started/k.direct-line-tokenDemonstrates how to use a Direct Line token instead of exposing the Direct Line secret.
01.getting-started/l.sharepoint-web-partDemonstrates how to host Web Chat as a SharePoint web part.
Branding, styling, and customization
02.branding-styling-and-customization/a.branding-web-chatIntroduces the ability to style Web Chat to match your brand. This method of custom styling will not break upon Web Chat updates.Branding Web Chat Demo
02.branding-styling-and-customization/b.idiosyncratic-manual-stylesDemonstrates how to make manual style changes, and is a more complicated and time-consuming way to customize styling of Web Chat. Manual styles may be broken upon Web Chat updates.Idiosyncratic Styling Demo
02.branding-styling-and-customization/c.display-sender-initialsDemonstrates how to display initials for both Web Chat participants.Bot initials Demo
02.branding-styling-and-customization/d.display-sender-imagesDemonstrates how to display images and initials for both Web Chat participants.User images Demo
02.branding-styling-and-customization/e.presentation-modeDemonstrates how to set up Presentation Mode, which displays chat history but does not show the send box, and disables the interactivity of Adaptive Cards.Presentation Mode Demo
02.branding-styling-and-customization/f.hide-upload-buttonDemonstrates how to hide file upload button via styling.Hide Upload Button Demo
02.branding-styling-and-customization/g.change-localeDemonstrates how to change locale when an activity is received from the bot.Change Locale Demo
02.branding-styling-and-customization/h.send-timeoutDemonstrates how to change timeout for outgoing messages.Send Timeout Demo
02.branding-styling-and-customization/i.change-locale-and-directionDemonstrates how to change locale and direction of the UI (RTL).Change Direction Demo
02.branding-styling-and-customization/j.activity-groupingDemonstrates how to customize activity grouping behavior.Activity Grouping Demo (Comprehensive)
02.branding-styling-and-customization/k.enable-emojiDemonstrates how to enable emoji autocorrect in the send box.Enable Emoji Demo
Speech
03.speech/a.direct-line-speechDemonstrates how to use Direct Line Speech channel in Web Chat.Direct Line Speech Demo
03.speech/b.cognitive-speech-services-jsIntroduces speech-to-text and text-to-speech ability using Cognitive Services Speech Services API.Speech Services with JS Demo
03.speech/c.cognitive-speech-services-with-lexical-resultDemonstrates how to use lexical result from Cognitive Services Speech Services API.Lexical Result Demo
03.speech/d.cognitive-speech-services-speech-recognition-onlyImplement Cognitive Speech Services with only Speech Recognition.Cognitive Speech: Speech Recognition
03.speech/e.select-voiceDemonstrates how to select speech synthesis voice based on activity.Select Voice Demo
03.speech/f.web-browser-speechDemonstrates how to implement text-to-speech using Web Chat's browser-based Web Speech API. (link to W3C standard in the sample)Web Speech API Demo
03.speech/g.hybrid-speechDemonstrates how to use both browser-based Web Speech API for speech-to-text, and Cognitive Services Speech Services API for text-to-speech.Hybrid Speech Demo
03.speech/h.select-audio-input-deviceDemonstrates how to select an audio input device.Select Audio Input Device Demo (Comprehensive)
03.speech/i.initial-silence-timeoutDemonstrates how to configure initial silence timeout.Configurable Initial Silence Timeout Demo
API
04.api/a.welcome-eventAdvanced tutorial: Demonstrates how to send welcome event with client capabilities such as browser language.Welcome Event Demo
04.api/b.piggyback-on-outgoing-activitiesAdvanced tutorial: Demonstrates how to add custom data to every outgoing activities.Backchannel Piggybacking Demo
04.api/c.incoming-activity-eventAdvanced tutorial: Demonstrates how to forward all incoming activities to a JavaScript event for further processing.Incoming Activity Demo
04.api/d.post-activity-eventAdvanced tutorial: Demonstrates how to send a message programmatically.Programmatic Posting Demo
04.api/e.piping-to-reduxAdvanced tutorial: Demonstrates how to pipe bot activities to your own Redux store and use your bot to control your page through bot activities and Redux.Piping to Redux Demo
04.api/f.selectable-activityAdvanced tutorial: Demonstrates how to add custom click behavior to each activity.Selectable Activity Demo
04.api/g.chat-send-historyAdvanced tutorial: Demonstrates the ability to save user input and allow the user to step back through previous sent messages.Chat Send History Demo
04.api/h.clear-after-idleAdvanced tutorial: Demonstrates how to customize the open URL behavior.Clear After Idle Demo
04.api/i.open-urlAdvanced tutorial: Demonstrates how to customize the open URL behavior.Customize Open URL Demo
04.api/j.redux-actionsAdvanced tutorial: Demonstrates how to incorporate redux middleware into your Web Chat app by sending redux actions through the bot. This example demonstrates manual styling based on activities between bot and user.Redux Actions Demo
04.api/k.telemetry-application-insightsAdvanced tutorial: Demonstrates how to collect telemetry measurement using Azure Application Insights.Telemetry using Application Insights Demo
04.api/l.telemetry-google-analyticsAdvanced tutorial: Demonstrates how to collect telemetry measurement using Google Analytics.Telemetry using Google Analytics Demo
04.api/m.enable-composition-modeAdvanced tutorial: Demonstrates how to enable composition mode.Telemetry using Google Analytics Demo
04.api/n.save-restore-scroll-positionAdvanced tutorial: Demonstrates how to save and restore scroll position.Save and Restore Scroll Position Demo
Custom components
05.custom-components/a.timestamp-groupingDemonstrates how to customize timestamps by showing or hiding timestamps and changing the grouping of messages by time.Timestamp Grouping Demo
05.custom-components/b.send-typing-indicatorDemonstrates how to send typing activity when the user start typing on the send box.User Typing Indicator Demo
05.custom-components/c.user-highlightingDemonstrates how to customize the styling of activities based whether the message is from the user or the bot.User Highlighting Demo
05.custom-components/d.reaction-buttonsIntroduces the ability to create custom components for Web Chat that are unique to your bot's needs. This tutorial demonstrates the ability to add reaction emoji such as :thumbsup: and :thumbsdown: to conversational activities.Reaction Buttons Demo
05.custom-components/e.card-componentsDemonstrates how to create custom activity card attachments, in this case GitHub repository cards.Card Components Demo
05.custom-components/f.password-inputDemonstrates how to create custom activity for password input.Password Input Demo
05.custom-components/g.activity-statusDemonstrates how to customize the activity status by including sender's name.Customize Activity Status Demo
05.custom-components/i.notificationDemonstrates how to use notification and customize the toast UI.Notification Demo
05.custom-components/j.typing-indicatorDemonstrates how to customize the typing indicator.Customize Typing Indicator Demo
05.custom-components/k.per-message-avatarDemonstrates how to customize the avatar on a per-message basis.Customize Avatar Demo (Comprehensive)
Recomposing UI
06.recomposing-ui/a.minimizable-web-chatAdvanced tutorial: Demonstrates how to add the Web Chat interface to your website as a minimizable show/hide chat box.Minimizable Web Chat Demo
06.recomposing-ui/b.speech-uiAdvanced tutorial: Demonstrates how to fully customize key components of your bot, in this case speech, which entirely replaces the text-based transcript UI and instead shows a simple speech button with the bot's response.Speech UI Demo
06.recomposing-ui/c.smart-displayDemonstrates how to compose Web Chat UI into a Smart DisplaySmart Display Demo
06.recomposing-ui/d.plain-uiAdvanced tutorial: Demonstrates how to customize the Web Chat UI by building from ground up instead of needing to rewrite entire Web Chat components.Plain UI Demo
06.recomposing-ui/e.extending-uiAdvanced tutorial: Demonstrates how to customize the Web Chat UI by extending the default UI.Extending UI Demo
Advanced Web Chat apps (Archived)
07.advanced-web-chat-apps/a.upload-to-azure-storageDemonstrates how to use upload attachments directly to Azure Storage
07.advanced-web-chat-apps/b.sso-for-enterpriseDemonstrates how to use single sign-on for enterprise single-page applications using OAuth
07.advanced-web-chat-apps/c.sso-for-intranetDemonstrates how to use single sign-on for Intranet apps using Azure Active Directory
07.advanced-web-chat-apps/d.sso-for-teamsDemonstrates how to use single sign-on for Microsoft Teams apps using Azure Active Directory
07.advanced-web-chat-apps/e.sso-on-behalf-of-authenticationDemonstrates how to use on-behalf-of authentication in an enterprise application