{"name":"react-select","version":"5.10.0","keywords":["combobox","form","input","multiselect","react","react-component","select","ui"],"author":{"name":"Jed Watson"},"license":"MIT","_id":"react-select@5.10.0","maintainers":[{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"brianvaughn","email":"briandavidvaughn@gmail.com"},{"name":"gwyneplaine","email":"cc.lee@live.com.au"},{"name":"react-select-release-bot","email":"automation+react-select@thinkmill.com.au"},{"name":"emmatown","email":"npm@emmas.town"}],"homepage":"https://github.com/JedWatson/react-select/tree/master#readme","bugs":{"url":"https://github.com/JedWatson/react-select/issues"},"dist":{"shasum":"9b5f4544cfecdfc744184b87651468ee0fb6e172","tarball":"http://registry-npm.ywwl.com/react-select/download/react-select-5.10.0.tgz","fileCount":137,"integrity":"sha512-k96gw+i6N3ExgDwPIg0lUPmexl1ygPe6u5BdQFNBhkpbwroIgCNXdubtIzHfThYXYYTubwOBafoMnn7ruEP1xA==","signatures":[{"sig":"MEYCIQDyYyJuxm67J7WYT/BMIbgVBE1B65SeXGX+yewIqgsv7wIhAIVEnYXPgFq+z3ga4ztEvIeoCKb3+3MASeQuuQ5MQrGR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":723910,"size":143675,"noattachment":false,"key":"/react-select/-/react-select-5.10.0.tgz"},"main":"dist/react-select.cjs.js","types":"dist/react-select.cjs.d.ts","module":"dist/react-select.esm.js","exports":{".":{"import":"./dist/react-select.cjs.mjs","module":"./dist/react-select.esm.js","default":"./dist/react-select.cjs.js"},"./base":{"import":"./base/dist/react-select-base.cjs.mjs","module":"./base/dist/react-select-base.esm.js","default":"./base/dist/react-select-base.cjs.js"},"./async":{"import":"./async/dist/react-select-async.cjs.mjs","module":"./async/dist/react-select-async.esm.js","default":"./async/dist/react-select-async.cjs.js"},"./animated":{"import":"./animated/dist/react-select-animated.cjs.mjs","module":"./animated/dist/react-select-animated.esm.js","default":"./animated/dist/react-select-animated.cjs.js"},"./creatable":{"import":"./creatable/dist/react-select-creatable.cjs.mjs","module":"./creatable/dist/react-select-creatable.esm.js","default":"./creatable/dist/react-select-creatable.cjs.js"},"./package.json":"./package.json","./async-creatable":{"import":"./async-creatable/dist/react-select-async-creatable.cjs.mjs","module":"./async-creatable/dist/react-select-async-creatable.esm.js","default":"./async-creatable/dist/react-select-async-creatable.cjs.js"}},"gitHead":"53b85346bb7defd937257b0daf9d6993ef20a59a","_npmUser":{"name":"react-select-release-bot","email":"automation+react-select@thinkmill.com.au"},"repository":{"url":"git+https://github.com/JedWatson/react-select.git#master","type":"git"},"_npmVersion":"10.9.2","description":"A Select control built with and for ReactJS","directories":{},"sideEffects":false,"_nodeVersion":"22.13.0","dependencies":{"prop-types":"^15.6.0","memoize-one":"^6.0.0","@babel/runtime":"^7.12.0","@emotion/cache":"^11.4.0","@emotion/react":"^11.8.1","@floating-ui/dom":"^1.0.1","react-transition-group":"^4.3.0","use-isomorphic-layout-effect":"^1.2.0","@types/react-transition-group":"^4.4.0"},"preconstruct":{"entrypoints":["index.ts","base/index.ts","animated/index.ts","async/index.ts","creatable/index.ts","async-creatable/index.ts"]},"_hasShrinkwrap":false,"devDependencies":{"react":"^16.13.0","enzyme":"^3.8.0","react-dom":"^16.13.0","jest-in-case":"^1.0.2","enzyme-to-json":"^3.3.0","@types/jest-in-case":"^1.0.6"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-select_5.10.0_1737734151342_0.5402420657122089","host":"s3://npm-registry-packages-npm-production"},"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&service=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&utm_medium=badge&utm_campaign=react-select)\n\n# React-Select\n\nThe Select control for [React](https://reactjs.com). Initially built for use in [KeystoneJS](http://www.keystonejs.com).\n\nSee [react-select.com](https://www.react-select.com) for live demos and comprehensive docs.\n\nReact Select is funded by [Thinkmill](https://www.thinkmill.com.au) and [Atlassian](https://atlaskit.atlassian.com). It represents a whole new approach to developing powerful React.js components that _just work_ out of the box, while being extremely customisable.\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#### With React Component\n\n```js\nimport React 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\nclass App extends React.Component {\n  state = {\n    selectedOption: null,\n  };\n  handleChange = (selectedOption) => {\n    this.setState({ selectedOption }, () =>\n      console.log(`Option selected:`, this.state.selectedOption)\n    );\n  };\n  render() {\n    const { selectedOption } = this.state;\n\n    return (\n      <Select\n        value={selectedOption}\n        onChange={this.handleChange}\n        options={options}\n      />\n    );\n  }\n}\n```\n\n#### With React Hooks\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    <div className=\"App\">\n      <Select\n        defaultValue={selectedOption}\n        onChange={setSelectedOption}\n        options={options}\n      />\n    </div>\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 }) => 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","publish_time":1737734151626,"_cnpm_publish_time":1737734151626,"dist-tags":{"beta":"5.0.0-beta.1","latest":"5.10.2"}}