1.0.3 • Published 3 years ago
danglebary-search-bar-react v1.0.3
danglebary-react-search-bar
A simple React search bar component which includes voice-to-text functionality.
Options
submitFunction
: Function to call when search bar input is submitted. (Required)noIcons
: Boolean used to hide/show icons in component. (also removes voice-to-text functionality) (Optional)noSearchIcon
: Boolean used to hide/show search icon in component. (Optional)noMicIcon
: Boolean used to hide/show mic icon in component. (also removes voice-to-text functionality) (Optional)noBorder
: Boolean used to hide/show bottom border of component. (Optional)containerStyles
: Takes key/value object of type React.CSSProperties. (Optional)
Diclaimer
- This component can be used without the voice-to-text option by adding "noMicIcon" as a prop to the component.
- The voice-to-text functionality currently only works on Chrome and Safari browsers.
- This component uses the package "react-speech-recognition" and will require this package to be installed.