{"id":13722287,"url":"https://github.com/jedwatson/react-select","last_synced_at":"2025-09-09T19:58:49.714Z","repository":{"id":20069913,"uuid":"23338716","full_name":"JedWatson/react-select","owner":"JedWatson","description":"The Select Component for React.js","archived":false,"fork":false,"pushed_at":"2025-03-09T03:12:08.000Z","size":19745,"stargazers_count":27905,"open_issues_count":458,"forks_count":4146,"subscribers_count":218,"default_branch":"master","last_synced_at":"2025-05-05T13:56:40.699Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://react-select.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JedWatson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-08-26T04:27:45.000Z","updated_at":"2025-05-04T15:37:02.000Z","dependencies_parsed_at":"2024-02-26T01:49:34.873Z","dependency_job_id":"b0852a7d-4143-4482-b68b-faa8ba646ffb","html_url":"https://github.com/JedWatson/react-select","commit_stats":{"total_commits":3137,"total_committers":519,"mean_commits":6.044315992292871,"dds":0.6719795983423653,"last_synced_commit":"a8b8f4342cc113e921bb238de2dd69a2d345b5f8"},"previous_names":[],"tags_count":172,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Freact-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Freact-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Freact-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Freact-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JedWatson","download_url":"https://codeload.github.com/JedWatson/react-select/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253760382,"owners_count":21959929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:01:26.878Z","updated_at":"2025-05-12T14:57:30.295Z","avatar_url":"https://github.com/JedWatson.png","language":"TypeScript","readme":"[![NPM](https://img.shields.io/npm/v/react-select.svg)](https://www.npmjs.com/package/react-select)\n[![CircleCI](https://circleci.com/gh/JedWatson/react-select/tree/master.svg?style=shield)](https://circleci.com/gh/JedWatson/react-select/tree/master)\n[![Coverage Status](https://coveralls.io/repos/JedWatson/react-select/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/JedWatson/react-select?branch=master)\n[![Supported by Thinkmill](https://thinkmill.github.io/badge/heart.svg)](http://thinkmill.com.au/?utm_source=github\u0026utm_medium=badge\u0026utm_campaign=react-select)\n\n# React-Select\n\nThe Select control for [React](https://reactjs.org). Initially built for use in [KeystoneJS](https://www.keystonejs.com).\n\nSee [react-select.com](https://www.react-select.com) for live demos and comprehensive docs.\n\n`react-select` is funded by [Thinkmill](https://www.thinkmill.com.au) and [Atlassian](https://atlaskit.atlassian.com).\nWe are an open source project that is continuously supported by the community.\n\nReact Select helps you develop powerful select components that _just work_ out of the box, without stopping you from customising the parts that are important to you.\n\nFor the story behind this component, watch Jed's talk at React Conf 2019 - [building React Select](https://youtu.be/yS0jUnmBujE)\n\nFeatures include:\n\n- Flexible approach to data, with customisable functions\n- Extensible styling API with [emotion](https://emotion.sh)\n- Component Injection API for complete control over the UI behaviour\n- Controllable state props and modular architecture\n- Long-requested features like option groups, portal support, animation, and more\n\n## Using an older version?\n\n- [v3, v4, and v5 upgrade guide](https://react-select.com/upgrade)\n- [v2 upgrade guide](https://react-select.com/upgrade-to-v2)\n- React Select v1 documentation and examples are available at [v1.react-select.com](https://v1.react-select.com)\n\n# Installation and usage\n\nThe easiest way to use react-select is to install it from npm and build it into your app with Webpack.\n\n```\nyarn add react-select\n```\n\nThen use it in your app:\n\n```js\nimport React, { useState } from 'react';\nimport Select from 'react-select';\n\nconst options = [\n  { value: 'chocolate', label: 'Chocolate' },\n  { value: 'strawberry', label: 'Strawberry' },\n  { value: 'vanilla', label: 'Vanilla' },\n];\n\nexport default function App() {\n  const [selectedOption, setSelectedOption] = useState(null);\n\n  return (\n    \u003cdiv className=\"App\"\u003e\n      \u003cSelect\n        defaultValue={selectedOption}\n        onChange={setSelectedOption}\n        options={options}\n      /\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n## Props\n\nCommon props you may want to specify include:\n\n- `autoFocus` - focus the control when it mounts\n- `className` - apply a className to the control\n- `classNamePrefix` - apply classNames to inner elements with the given prefix\n- `isDisabled` - disable the control\n- `isMulti` - allow the user to select multiple values\n- `isSearchable` - allow the user to search for matching options\n- `name` - generate an HTML input with this name, containing the current value\n- `onChange` - subscribe to change events\n- `options` - specify the options the user can select from\n- `placeholder` - change the text displayed when no option is selected\n- `noOptionsMessage` - ({ inputValue: string }) =\u003e string | null - Text to display when there are no options\n- `value` - control the current value\n\nSee the [props documentation](https://www.react-select.com/props) for complete documentation on the props react-select supports.\n\n## Controllable Props\n\nYou can control the following props by providing values for them. If you don't, react-select will manage them for you.\n\n- `value` / `onChange` - specify the current value of the control\n- `menuIsOpen` / `onMenuOpen` / `onMenuClose` - control whether the menu is open\n- `inputValue` / `onInputChange` - control the value of the search input (changing this will update the available options)\n\nIf you don't provide these props, you can set the initial value of the state they control:\n\n- `defaultValue` - set the initial value of the control\n- `defaultMenuIsOpen` - set the initial open value of the menu\n- `defaultInputValue` - set the initial value of the search input\n\n## Methods\n\nReact-select exposes two public methods:\n\n- `focus()` - focus the control programmatically\n- `blur()` - blur the control programmatically\n\n## Customisation\n\nCheck the docs for more information on:\n\n- [Customising the styles](https://www.react-select.com/styles)\n- [Using custom components](https://www.react-select.com/components)\n- [Using the built-in animated components](https://www.react-select.com/home#animated-components)\n- [Creating an async select](https://www.react-select.com/async)\n- [Allowing users to create new options](https://www.react-select.com/creatable)\n- [Advanced use-cases](https://www.react-select.com/advanced)\n- [TypeScript guide](https://www.react-select.com/typescript)\n\n## TypeScript\n\nThe v5 release represents a rewrite from JavaScript to TypeScript. The types for v4 and earlier releases are available at [@types](https://www.npmjs.com/package/@types/react-select). See the [TypeScript guide](https://www.react-select.com/typescript) for how to use the types starting with v5.\n\n# Thanks\n\nThank you to everyone who has contributed to this project. It's been a wild ride.\n\nIf you like React Select, you should [follow me on Twitter](https://twitter.com/jedwatson)!\n\nShout out to [Joss Mackison](https://github.com/jossmac), [Charles Lee](https://github.com/gwyneplaine), [Ben Conolly](https://github.com/Noviny), [Tom Walker](https://github.com/bladey), [Nathan Bierema](https://github.com/Methuselah96), [Eric Bonow](https://github.com/ebonow), [Emma Hamilton](https://github.com/emmatown), [Dave Brotherstone](https://github.com/bruderstein), [Brian Vaughn](https://github.com/bvaughn), and the [Atlassian Design System](https://atlassian.design) team who along with many other contributors have made this possible ❤️\n\n## License\n\nMIT Licensed. Copyright (c) Jed Watson 2022.\n","funding_links":[],"categories":["Select Controls"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedwatson%2Freact-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedwatson%2Freact-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedwatson%2Freact-select/lists"}