react-mui-autocomplete-highlighter

Material-UI Autocomplete Search Highlighter for React

Usage no npm install needed!

<script type="module">
  import reactMuiAutocompleteHighlighter from 'https://cdn.skypack.dev/react-mui-autocomplete-highlighter';
</script>

README

React: MaterialUI Autocomplete Highlighter

Material-UI Autocomplete Highlighter is a library for React to highlight searched query in autocomplete suggestions

Installation

npm i react-mui-autocomplete-highlighter

Usage

import {Highlighter} from 'mui-autocomplete-highlighter';

<Autocomplete 
    ...
    renderOption={(option, {inputValue}) => (
        <Highlighter 
            option={option} 
            query={inputValue} 
            optionKey="label"
            settings={{
                isCaseSensitive: false,
                highlighterClass: '',
                defaultClass: ''
            }}
        />
    )}
/>