You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

react-select

Package Overview
Dependencies
Maintainers
2
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-select

A Select control built with and for ReactJS


Version published
Weekly downloads
4.6M
decreased by-7.61%
Maintainers
2
Install size
4.01 MB
Created
Weekly downloads
 

Package description

What is react-select?

The react-select npm package is a flexible and customizable select input control for React applications. It provides a powerful set of features that allow developers to create simple dropdowns, multi-selects, async data loading, and more, with a focus on accessibility and customizability.

What are react-select's main functionalities?

Basic Single Select

This feature allows you to create a basic single selection dropdown where a user can select one option from a predefined list.

{"import Select from 'react-select';\n\nconst options = [\n  { value: 'chocolate', label: 'Chocolate' },\n  { value: 'strawberry', label: 'Strawberry' },\n  { value: 'vanilla', label: 'Vanilla' }\n];\n\nconst MyComponent = () => (\n  <Select options={options} />\n);"}

Multi-Select

This feature enables users to select multiple options from the dropdown. It is useful for fields that require more than one selection.

{"import Select from 'react-select';\n\nconst options = [\n  { value: 'chocolate', label: 'Chocolate' },\n  { value: 'strawberry', label: 'Strawberry' },\n  { value: 'vanilla', label: 'Vanilla' }\n];\n\nconst MyComponent = () => (\n  <Select isMulti options={options} />\n);"}

Asynchronous Loading

This feature allows for loading options asynchronously, which is useful when the options are not available at initial render time or need to be fetched based on user input.

{"import Select from 'react-select';\nimport AsyncSelect from 'react-select/async';\n\nconst loadOptions = (inputValue, callback) => {\n  setTimeout(() => {\n    callback(filterOptions(inputValue));\n  }, 1000);\n};\n\nconst MyComponent = () => (\n  <AsyncSelect loadOptions={loadOptions} />\n);"}

Creatable Select

This feature allows users to create a new option on the fly if the option they are looking for is not available in the list.

{"import CreatableSelect from 'react-select/creatable';\n\nconst options = [\n  { value: 'chocolate', label: 'Chocolate' },\n  { value: 'strawberry', label: 'Strawberry' },\n  { value: 'vanilla', label: 'Vanilla' }\n];\n\nconst MyComponent = () => (\n  <CreatableSelect isMulti options={options} />\n);"}

Other packages similar to react-select

Readme

Source

NPM CDNJS Build Status Coverage Status Supported by Thinkmill

React-Select

A Select control built with and for React. Initially built for use in KeystoneJS.

V2 Alpha

This is an experimental branch for the new v2 react-select component. Explanation and Docs to be written.

License

MIT Licensed. Copyright (c) Jed Watson 2018.

Keywords

FAQs

Package last updated on 06 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc