React Select

A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete, async and creatable support.

🎉 Feature Highlights
Welcome
Getting Started
Animated Components
Custom Styles
Async
Creatable
Fixed Options

Link toWelcome

Each of the examples below is an interactive example of react-select.

See the source or open the examples on codesandbox using the buttons that appear when you hover over each select below.

For complete docs, see the Props API and Advanced Usage.

To contribute, or open an issue, check out the source code on GitHub.

Single

Ocean

Multi

Purple
Red

Link toGetting Started

Start by installing react-select

yarn add react-select

or

npm i --save react-select

Import the default export and render in your component:

import React from 'react'
import Select from 'react-select'

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

const MyComponent = () => (
  <Select options={options} />
)

Grouped

Blue

Link toAnimated Components

React-Select comes with a makeAnimated function that create animated wrappers around components passed in as arguments. If no arguments are passed, built-in components are wrapped instead.

import makeAnimated from 'react-select/animated';

Remove the values below to see them in action.

Animation

Orange
Yellow

Link toCustom Styles

Style individual components with custom css using the styles prop.

Single

Purple

Multi Select

Ocean
Blue

You can see a full explanation of how to do this on the styles page.

Link toAsync

Use the Async component to load options from a remote source as the user types.

import AsyncSelect from 'react-select/async';

Callbacks

Select...

Promises

Select...

You can see a full explanation of how to do this on the async page.

Link toCreatable

The Creatable component enables users to create new options along with choosing existing options.

import Creatable from 'react-select/creatable';

Creatable Example

Select...

You can see a full explanation of how to do this on the creatable page.

Link toFixed Options

Fixed Options Example

Ocean
Red
Blue

Copyright © Jed Watson, 2022. MIT Licensed.

Thanks to Thinkmill and Atlassian for supporting this project.