Intro Popup is a full screen overlay-style popup that is automatically displayed when the user first interacts with Push-To-Talk Button. It displays a customizable introduction text that briefly explains voice features microphone permissions are needed for.
The user will have a choice between allowing the microphone permissions or do that later. Allowing will display the system permission prompt.
Intro Popup also automatically appears to help recover from a common problems.
<script type="text/javascript" src="https://unpkg.com/@speechly/browser-ui/core/intro-popup.js"></script>
<intro-popup>
<span slot="priming-body">You will be able to book faster with voice.</span>
</intro-popup>
hide
- Optional “auto” | “false” | “true”. Auto setting displays the popup upon mic button interaction or in case a problem is detected. False and true allow manual visibility control. Default: “auto”remsize
- Optional rem override. “16px” recommended for Wix. Default: “1rem”customtypography
- Optional “true” | “false”. True inherits css typography settings. Default: “false”customcssurl
- Optional string (url to .css file). Allows for further customization of component’s shadow root.<span slot="priming-title">Allow booking with voice</span>
<span slot="priming-body">You will be able to book faster with voice.</span>
speechlyintroclosed
- CustomEvent emitted on closed by user{type: "speechlyintroready"}
- Broadcasted upon mount{type: "speechlyintroclosed", firstrun: undefined|true}
- Broadcasted when popup is closed by user{type: "speechlypoweron"}
- Displays the intro popup’s welcome screen. This message is automatically emitted by push-to-talk-button when poweron=“true”|“auto”.{type: "speechstate", state: ClientState}
- Displays the intro popup’s connecting and error screens. This message is automatically emitted by push-to-talk-button.Place <IntroPopup>
component inside your <SpeechProvider>
. Please see Basic usage for a full app example.
import { IntroPopup } from "@speechly/react-ui";
...
<SpeechProvider appId="YOUR_APP_ID_FROM_SPEECHLY_DASHBOARD">
<IntroPopup>
<span slot="priming-body">You will be able to book faster with voice.</span>
</IntroPopup>
</SpeechProvider>
...
Name | Type |
---|---|
appId? | string |
children? | React.ReactNode |
Last updated by Mathias Lindholm on March 17, 2022 at 15:02 +0200
Found an error on our documentation? Please file an issue or make a pull request