downshift, react-autocomplete, and react-select are React libraries for building autocomplete inputs, dropdowns, and selection interfaces. downshift is a headless utility that provides state management and accessibility primitives while leaving all rendering to the developer. react-autocomplete is a minimal, unstyled component using render props for basic autocomplete functionality. react-select is a fully-featured, styled select component with built-in support for async options, multi-selection, and theming. All three aim to simplify creating accessible selection UIs, but they differ significantly in philosophy, feature set, and maintenance status.
When you need to add a search-as-you-type input or a dropdown selector to your React app, three packages often come up: downshift, react-autocomplete, and react-select. They all solve similar problems but with very different philosophies. Let’s break down how they work, where they shine, and what trade-offs you’ll face.
downshift gives you complete control over rendering and behavior. It’s a headless utility that manages the complex state logic (like keyboard navigation, focus, and ARIA attributes) but leaves every visual detail up to you.
// downshift: fully custom render
import { useCombobox } from 'downshift';
function CustomAutocomplete({ items }) {
const {
isOpen,
getInputProps,
getToggleButtonProps,
getMenuProps,
getItemProps,
highlightedIndex
} = useCombobox({ items });
return (
<div>
<input {...getInputProps()} />
<button {...getToggleButtonProps()}>▼</button>
<ul {...getMenuProps()}>
{isOpen && items.map((item, index) => (
<li
key={item.id}
{...getItemProps({ item, index })}
style={{ backgroundColor: highlightedIndex === index ? '#eee' : 'white' }}
>
{item.name}
</li>
))}
</ul>
</div>
);
}
react-autocomplete is a minimalist, unstyled component that handles basic autocomplete behavior but expects you to provide most of the rendering logic. It’s less opinionated than react-select but more prescriptive than downshift.
// react-autocomplete: render props pattern
import Autocomplete from 'react-autocomplete';
function BasicAutocomplete({ items }) {
return (
<Autocomplete
items={items}
getItemValue={(item) => item.name}
renderItem={(item, isHighlighted) => (
<div style={{ background: isHighlighted ? '#eee' : 'white' }}>
{item.name}
</div>
)}
inputProps={{ placeholder: 'Search...' }}
/>
);
}
react-select is a fully-featured, styled component out of the box. It includes theming, async loading, multi-select, and many other features with minimal setup. You can customize it, but you’re working within its design system.
// react-select: batteries-included
import Select from 'react-select';
function StyledSelect({ options }) {
return (
<Select
options={options}
placeholder="Choose an option..."
isSearchable
/>
);
}
All three packages aim for accessibility, but their approaches differ:
downshift strictly follows WAI-ARIA practices and gives you full control over ARIA attributes. You must implement proper roles and labels yourself, but the underlying state management ensures correct keyboard handling (arrow keys, Enter, Escape).
react-autocomplete provides basic keyboard navigation (arrow keys, Enter) but leaves ARIA implementation to you. Its documentation includes accessibility notes, but it’s not as comprehensive as downshift.
react-select ships with built-in ARIA compliance and extensive keyboard support (including type-to-search, tab navigation, and screen reader announcements). It’s the most accessible out of the box.
downshift has zero built-in styles. You bring your own CSS, CSS-in-JS, or styling library. This makes it ideal for design systems that require pixel-perfect control.
react-autocomplete also has no default styles, but its API is less flexible for complex layouts (e.g., it doesn’t easily support custom dropdown headers or footers).
react-select uses emotion for styling and supports theming via a styles prop or a theme function. You can override any part of its appearance, but escaping its component structure can be challenging if you need radically different markup.
// react-select: custom styling
const customStyles = {
control: (provided) => ({
...provided,
border: '2px solid blue',
borderRadius: '8px'
}),
option: (provided, state) => ({
...provided,
backgroundColor: state.isFocused ? '#f0f0f0' : 'white'
})
};
<Select styles={customStyles} options={options} />
Async Loading:
downshift: You manage data fetching yourself; just update the items prop.react-autocomplete: Pass an onMenuOpen or handle input changes to fetch data.react-select: Built-in loadOptions prop for async options with loading indicators.Multi-select:
downshift: Possible but requires manual state management for selected items.react-autocomplete: Not supported out of the box.react-select: Enable with isMulti prop.Creatable Options (allowing users to add new items):
downshift: Implement yourself by checking input value against items.react-autocomplete: Not built-in.react-select: Use the CreatableSelect component from react-select/creatable.As of 2024:
react-autocomplete is deprecated. Its npm page states: "This package is no longer maintained. Please use downshift instead." New projects should avoid it.
downshift and react-select are actively maintained with regular updates and strong community support.
downshiftreact-autocompletereact-select| Feature | downshift | react-autocomplete | react-select |
|---|---|---|---|
| Maintenance | ✅ Active | ❌ Deprecated | ✅ Active |
| Styling | 💯 Zero styles (headless) | 💯 Zero styles | 🎨 Themed (emotion) |
| Accessibility | ✅ Manual ARIA | ⚠️ Basic | ✅ Built-in |
| Multi-select | ⚙️ Manual impl | ❌ No | ✅ isMulti prop |
| Async Support | ⚙️ Manual fetch | ⚙️ Manual fetch | ✅ loadOptions |
| Learning Curve | Steeper | Moderate | Gentle |
react-select if you need a quick, robust solution that works out of the box.downshift when you hit the limits of react-select or need to build something truly custom.react-autocomplete for new work — its functionality is better served by the other two, and it’s no longer maintained.The right choice depends on your project’s needs: speed and convention (react-select) versus flexibility and control (downshift).
Choose react-select when you need a production-ready, accessible select component with minimal setup. It's perfect for standard use cases like dropdowns, multi-select, async loading, and creatable options. Its built-in theming and comprehensive feature set make it a great choice when your design requirements align with its capabilities or can be reasonably customized.
Choose downshift when you need complete control over the UI and behavior of your autocomplete or select component. It's ideal for design systems, custom component libraries, or complex interactions that don't fit standard patterns. Be prepared to handle all rendering, styling, and some accessibility details yourself, though it provides excellent state management and keyboard navigation logic.
Do not choose react-autocomplete for new projects — it is officially deprecated according to its npm page, which recommends using downshift instead. Only consider it if you're maintaining an existing codebase that already depends on it, and plan to migrate to a maintained alternative soon.
The Select control for React. Initially built for use in KeystoneJS.
See react-select.com for live demos and comprehensive docs.
React Select is funded by Thinkmill and Atlassian. It represents a whole new approach to developing powerful React.js components that just work out of the box, while being extremely customisable.
For the story behind this component, watch Jed's talk at React Conf 2019 - building React Select
Features include:
The easiest way to use react-select is to install it from npm and build it into your app with Webpack.
yarn add react-select
Then use it in your app:
import React from 'react';
import Select from 'react-select';
const options = [
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry' },
{ value: 'vanilla', label: 'Vanilla' },
];
class App extends React.Component {
state = {
selectedOption: null,
};
handleChange = (selectedOption) => {
this.setState({ selectedOption }, () =>
console.log(`Option selected:`, this.state.selectedOption)
);
};
render() {
const { selectedOption } = this.state;
return (
<Select
value={selectedOption}
onChange={this.handleChange}
options={options}
/>
);
}
}
import React, { useState } from 'react';
import Select from 'react-select';
const options = [
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry' },
{ value: 'vanilla', label: 'Vanilla' },
];
export default function App() {
const [selectedOption, setSelectedOption] = useState(null);
return (
<div className="App">
<Select
defaultValue={selectedOption}
onChange={setSelectedOption}
options={options}
/>
</div>
);
}
Common props you may want to specify include:
autoFocus - focus the control when it mountsclassName - apply a className to the controlclassNamePrefix - apply classNames to inner elements with the given prefixisDisabled - disable the controlisMulti - allow the user to select multiple valuesisSearchable - allow the user to search for matching optionsname - generate an HTML input with this name, containing the current valueonChange - subscribe to change eventsoptions - specify the options the user can select fromplaceholder - change the text displayed when no option is selectednoOptionsMessage - ({ inputValue: string }) => string | null - Text to display when there are no optionsvalue - control the current valueSee the props documentation for complete documentation on the props react-select supports.
You can control the following props by providing values for them. If you don't, react-select will manage them for you.
value / onChange - specify the current value of the controlmenuIsOpen / onMenuOpen / onMenuClose - control whether the menu is openinputValue / onInputChange - control the value of the search input (changing this will update the available options)If you don't provide these props, you can set the initial value of the state they control:
defaultValue - set the initial value of the controldefaultMenuIsOpen - set the initial open value of the menudefaultInputValue - set the initial value of the search inputReact-select exposes two public methods:
focus() - focus the control programmaticallyblur() - blur the control programmaticallyCheck the docs for more information on:
The v5 release represents a rewrite from JavaScript to TypeScript. The types for v4 and earlier releases are available at @types. See the TypeScript guide for how to use the types starting with v5.
Thank you to everyone who has contributed to this project. It's been a wild ride.
If you like React Select, you should follow me on twitter!
Shout out to Joss Mackison, Charles Lee, Ben Conolly, Tom Walker, Nathan Bierema, Eric Bonow, Emma Hamilton, Dave Brotherstone, Brian Vaughn, and the Atlassian Design System team who along with many other contributors have made this possible ❤️
MIT Licensed. Copyright (c) Jed Watson 2022.