Hooks & Utilities
v1.0.0Added in 1.0.0
Search that ignores case and diacritics, ranks the best matches first and returns the ranges to highlight.
Type in the field: zurich finds Zürich, sao paulo finds São Paulo, and every word of the query has to match somewhere. The best matches rise to the top and the matched letters are highlighted. Turn on fuzzy to let letters in order with gaps match too (dsdf finds Düsseldorf).
npx wingo-ui@latest add text-matchNo dependencies beyond React.
filterByText(cities, "", c => [c.name, c.country])