ais-voice-search
<ais-voice-search // Optional parameters :search-as-you-speak="boolean" :button-title="string" :disabled-button-title="string" :class-names="object" />
About this widget
The ais-voice-search
widget lets the user perform a voice-based query.
It uses the Web Speech API, which only Chrome (from version 25) has implemented so far. This means the voiceSearch
widget only works on desktop Chrome and Android Chrome. It doesn’t work on iOS Chrome, which uses the iOS WebKit.
Examples
1
<ais-voice-search />
Props
search-as-you-speak
|
type: boolean
default: false
Optional
Whether or not to trigger the search as you speak. If |
||
Copy
|
|||
button-title
|
type: string
default: 'Search by voice'
Optional
The |
||
Copy
|
|||
disabled-button-title
|
type: string
default: 'Search by voice (not supported on this browser)'
Optional
The |
||
Copy
|
|||
class-names
|
type: object
default: {}
Optional
The CSS classes to override.
|
||
Copy
|
Customize the UI
default
|
The slot to override the complete DOM output of the widget. Scope
|
||
Copy
|
|||
buttonText
|
The slot to override the DOM output inside the button. Scope
|
||
Copy
|
|||
status
|
The slot to override the DOM output of the status. Scope
|
||
Copy
|
HTML output
1
2
3
4
5
6
7
8
<div class="ais-VoiceSearch">
<button class="ais-VoiceSearch-button" type="button" title="Search by voice">
...
</button>
<div class="ais-VoiceSearch-status">
...
</div>
</div>