1

For a project I am using Microsoft webchat smart display sample. Smart Display github link Now I want to add a Text box on the screen so that user can use voice as well as text as input. As the code is using directlinespeech adaptor how can I add textbox in this code.

Todor Minakov
  • 19,097
  • 3
  • 55
  • 60

1 Answers1

0

You can achieve this by simply including the SendTextBox component within the Composer API container. There is nothing pretty about how the below code renders as it is lacking any styling. You will need to play with the CSS to get it to look how you wish. As you can see in the included image, the send box is rendered at the top of the page. I did change the background color to make it more visible within the image.

import { Components } from 'botframework-webchat';
const { SendTextBox, Composer } = Components;

[...]

return (
  !!directLineSpeechAdapters && (
    <Composer {...directLineSpeechAdapters}>
      <SmartDisplay />
      <SendTextBox />
    </Composer>
  )
);

enter image description here

Hope of help!

Steven Kanberg
  • 6,078
  • 2
  • 16
  • 35