typeahead-react-skeleton
v1.0.0
Published
This is a skeleton for a typeahead component.
Downloads
3
Readme
About
This is a skeleton for a typeahead component.
Props
- defaultValue: defaultValue from one of the option list
- options: Array of strings
- onSelect: function callback once a value is selected, returns value selected
- placeholder: placeholder for search input
Styling
typeahead-container: the overall container of the component you can change width, background color, color and font size, make sure the font to be used is defined here as well.
typeahead-sub-container: the sub container doesn't need to be modified
typeahead-suggestion-container: the container for suggestion text that are to be displayed
typeahead-input: the search bar for the component
typeahead-search-container: container for the result that are changed according to what user types.
typeahead-search-item: individual item in the search container
typeahead-search-container > .active: the current selected from the list
Output
Demo
https://karkipy.github.io/typeahead/index.html