{"name":"react-select","version":"1.0.0-beta6","description":"A Select control built with and for ReactJS","main":"lib/Select.js","style":"dist/default.css","author":{"name":"Jed Watson"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/JedWatson/react-select.git"},"dependencies":{"classnames":"^2.2.1","react-input-autosize":"^0.6.5"},"devDependencies":{"babel":"^5.8.23","babel-eslint":"^4.1.3","chai":"^3.4.1","coveralls":"^2.11.4","eslint":"^1.10.2","eslint-plugin-react":"^3.10.0","gulp":"^3.9.0","istanbul":"^0.4.1","jsdom":"^7.1.0","mocha":"^2.3.4","react":"^0.14.0","react-addons-test-utils":"^0.14.0","react-component-gulp-tasks":"^0.7.7","react-dom":"^0.14.0","react-gravatar":"^2.2.2","sinon":"^1.17.2","unexpected":"^10.3.1","unexpected-dom":"^3.0.2","unexpected-react":"^0.3.2","unexpected-sinon":"^9.0.4"},"peerDependencies":{"react":"^0.14.0","react-dom":"^0.14.0"},"browserify-shim":{"classnames":"global:classNames","react":"global:React","react-dom":"global:ReactDOM","react-input-autosize":"global:AutosizeInput"},"scripts":{"build":"gulp clean && NODE_ENV=production gulp build","bump":"gulp bump","bump:major":"gulp bump:major","bump:minor":"gulp bump:minor","cover":"istanbul cover _mocha -- -u exports --compilers js:babel/register -R spec","coveralls":"NODE_ENV=test istanbul cover _mocha --report lcovonly -- -u exports --compilers js:babel/register -R spec && cat coverage/lcov.info | coveralls","examples":"gulp dev:server","lint":"eslint .","publish:examples":"NODE_ENV=production gulp publish:examples","release":"NODE_ENV=production gulp release","start":"gulp dev","test":"mocha --compilers js:babel/register","watch":"gulp watch:lib"},"keywords":["combobox","form","input","multiselect","react","react-component","select","ui"],"gitHead":"161f98bdacece478c07e65b5c4b60c68f3216f4c","bugs":{"url":"https://github.com/JedWatson/react-select/issues"},"homepage":"https://github.com/JedWatson/react-select#readme","_id":"react-select@1.0.0-beta6","_shasum":"92d128a96322f1796f8f159bba69069ccf24ec4e","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"jedwatson","email":"jed.watson@me.com"},"dist":{"shasum":"92d128a96322f1796f8f159bba69069ccf24ec4e","tarball":"http://registry-npm.ywwl.com/react-select/download/react-select-1.0.0-beta6.tgz","integrity":"sha512-cBlZMr77FuZuaC8Kl4tIoGfSUeo+uQTxj1TVCJVNtvTTS/qOQ3cbXT7BIHOr736QVZr9YR9ZR8dFuwC+zfcBjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3wbQePjRxHaunk3E9QmyP0iCzUfDD3196SWBq0N5cjAIhAJBaN4LhoTqWIRnjEHUDwTN6/0TOjStZGWcDyXK6qfdF"}],"size":261771,"noattachment":false,"key":"/react-select/-/react-select-1.0.0-beta6.tgz"},"maintainers":[{"name":"jedwatson","email":"jed.watson@me.com"}],"directories":{},"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":1448801896953,"_cnpm_publish_time":1448801896953,"dist-tags":{"beta":"5.0.0-beta.1","latest":"5.10.2"}}