DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk3 min

How to Use the React Select Component in a React App

Add React Select to a React app with a basic options array, then adapt it for controlled state, multiple choices, remote loading, or user-created options.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install react-select, import its Select component, and pass an array of options to add a searchable select control to a React app. Use value and onChange when your app needs to manage the selection, or choose the library’s multi-select, async, or creatable variant for a different interaction.

Install React Select

Use npm or Yarn to add the package, as shown in the official React Select getting-started guide:

npm i --save react-select

Or:

yarn add react-select

The guide demonstrates importing the default Select export from react-select and rendering it with an options array.

Render a basic select

Each option in this example has a value for application logic and a label for display:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import Select from 'react-select';

const options = [
  { value: 'chocolate', label: 'Chocolate' },
  { value: 'strawberry', label: 'Strawberry' },
  { value: 'vanilla', label: 'Vanilla' },
];

export default function FlavorSelect() {
  return <Select options={options} />;
}

With this minimal version, React Select manages its own selection. To respond to a choice or keep the selection in your app’s state, make it controlled.

Manage the selected option with React state

For a controlled select, pass the current option through value and update it in onChange. React Select’s package documentation demonstrates this state-based pattern: react-select on npm.

import { 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 FlavorSelect() {
  const [selectedOption, setSelectedOption] = useState(null);

  return (
    <Select
      options={options}
      value={selectedOption}
      onChange={setSelectedOption}
    />
  );
}

onChange supplies the new selection, which the example stores in state. If you only need to set an initial choice and do not need to control later changes from parent state, use defaultValue instead. React Select also supports initial menu and input values with defaultMenuIsOpen and defaultInputValue.

Choose the right selection behavior

Need Approach How it changes the interaction
One choice from local options <Select options={options} /> Use the default component; search behavior is governed by isSearchable.
More than one choice <Select isMulti options={options} /> Enables multiple selection.
Choices loaded remotely as a user types AsyncSelect from react-select/async Loads options asynchronously rather than relying only on a local list.
Allow users to add a choice Creatable from react-select/creatable Adds an option-creation interaction alongside choosing existing options.

The project describes React Select as “A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete, async and creatable support.” See the official site for its getting-started examples.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Multiple selection

Add isMulti when a user may select several options. Keep value and onChange controlled by state if the rest of the app needs to read or update the selected options.

<Select isMulti options={options} />

Remote options

Use AsyncSelect when choices come from a remote source and should be loaded as the user types. Import it from react-select/async:

import AsyncSelect from 'react-select/async';

Async loading changes where options come from; it does not by itself mean users can create new options.

User-created options

Use Creatable when users need to enter choices that are not already in the available list. Import it from react-select/creatable:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import Creatable from 'react-select/creatable';

This changes whether users can add choices; it is separate from loading options remotely.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Customize appearance and behavior

Start with the styles prop to adjust the appearance of individual parts of the select. The official site also documents animated wrappers through makeAnimated. For deeper changes to how the interface behaves, the package documentation describes a Component Injection API; replacing components requires more care than applying styles. Consult the package documentation for the current prop details and examples.

Useful props include isDisabled, isMulti, isSearchable, name, noOptionsMessage, onChange, options, placeholder, and value. When you set name, React Select can generate an HTML input containing the current value. Check the current documentation for the exact types and behavior of less common props.

Give the control an accessible name

Provide a clear label so users, including people using screen readers, can identify the control. React’s guidance for native selects explains the importance of a label announced when the select receives focus: React select reference. Because that reference covers the native select element, it is baseline guidance—not proof that every React Select configuration or customization is accessible.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Check that the label is programmatically associated with the control in your implementation.
  • Test keyboard interaction and the behavior with the assistive technologies your audience uses.
  • When injecting replacement components, verify that the change preserves expected keyboard and screen-reader interactions.

Check version-specific details

The npm listing showed version 5.10.2 on October 4, 2026; package versions can change, so check the current npm listing before relying on a version-specific example. The listing says v5 includes TypeScript declarations and directs users of v4 and earlier to the @types package.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.