{"id":14384870,"url":"https://github.com/hellojwilde/react-pick","last_synced_at":"2025-08-23T18:30:49.167Z","repository":{"id":29474868,"uuid":"33011544","full_name":"hellojwilde/react-pick","owner":"hellojwilde","description":"Accessible autocompletion widgets, implemented in React.","archived":false,"fork":true,"pushed_at":"2016-03-31T14:56:17.000Z","size":4700,"stargazers_count":19,"open_issues_count":4,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-15T02:51:26.884Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"reactjs/react-autocomplete","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hellojwilde.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-27T22:14:32.000Z","updated_at":"2017-03-22T21:50:58.000Z","dependencies_parsed_at":"2023-07-03T10:06:26.140Z","dependency_job_id":null,"html_url":"https://github.com/hellojwilde/react-pick","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojwilde%2Freact-pick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojwilde%2Freact-pick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojwilde%2Freact-pick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojwilde%2Freact-pick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellojwilde","download_url":"https://codeload.github.com/hellojwilde/react-pick/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230720917,"owners_count":18270477,"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-28T18:01:44.366Z","updated_at":"2024-12-21T13:30:20.929Z","avatar_url":"https://github.com/hellojwilde.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# react-pick\n\n[![Build Status](https://travis-ci.org/hellojwilde/react-pick.svg?branch=master)](https://travis-ci.org/hellojwilde/react-pick)\n\nAccessible autocompletion components (e.g. typeahead inputs, popups, and comboboxes), implemented in React.\n\nIntially derived from Ryan Florence's awesome [react-autocomplete](https://github.com/rackt/react-autocomplete).\n\n## Demos\n\n - Pick a US state: [http://jwilde.me/react-pick/basic/](http://jwilde.me/react-pick/basic/)\n - Pick a set of Flickr images: [http://jwilde.me/react-pick/flickr/](http://jwilde.me/react-pick/flickr/)\n\n## Installation \u0026 Usage\n\n`npm install react-pick`\n\nYou'll need to make sure you're including the `styles.css` file in the root of the npm module in your app somehow. Or write your own, better stylesheet.\n\n### What's inside?\n\nFor out-of-the-box usage:\n\n- [`\u003cCombobox\u003e`](https://github.com/hellojwilde/react-pick/blob/master/src/Combobox.js) - Supports find displaying asynchronous autocomplete suggestions inline as \"type ahead\" text, as a popup menu, and as both at once. Supports keyboard navigation, and seeks to be WAI-ARIA compliant.\n\nFor customizing `\u003cCombobox\u003e` and creating your own components:\n\n- [`\u003cTypeaheadInput\u003e`](https://github.com/hellojwilde/react-pick/blob/master/src/TypeaheadInput.js) - An `\u003cinput\u003e` that robustly inserts \"type ahead\" text.\n- [`\u003cInputWithPopup\u003e`](https://github.com/hellojwilde/react-pick/blob/master/src/InputWithPopup.js) - Attaches a popup to an `\u003cinput\u003e`.\n- [`\u003cList\u003e`](https://github.com/hellojwilde/react-pick/blob/master/src/List.js) - A popup for rendering a list of possible completion options.\n- [`\u003cListOption\u003e`](https://github.com/hellojwilde/react-pick/blob/master/src/ListOption.js) - The default component for rendering options in `\u003cListPopup\u003e`.\n\n### How do you use `\u003cCombobox\u003e`?\n\nPretty much the same way you would the `\u003cinput\u003e` component in React, but with an extra `getOptionsForInputValue` property to fetch autocompletion options.\n\n```js\nvar React = require('react');\nvar {Combobox} = require('react-pick');\n\nvar AWESOME_PEOPLE = [\n  'Ryan Florence',\n  'Pete Hunt', \n  'Jonathan Wilde'\n];\n\nvar MyAppWithACombobox = React.createClass({\n\n  getInitialState: function() {\n    return {value: null};\n  },\n\n  getOptionsForInputValue: function(inputValue) {\n    return new Promise(function(resolve, reject) {\n      inputValue = inputValue.toLowerCase();\n\n      resolve(\n        AWESOME_PEOPLE\n          .map((person) =\u003e person.toLowerCase())\n          .filter((person) =\u003e person.indexOf(inputValue) === 0)\n      );\n    });\n  },\n\n  handleChange: function(newValue) {\n    this.setState({value: newValue});\n  },\n\n  render: function() {\n    \u003cdiv className=\"app\"\u003e\n      \u003cCombobox\n        getOptionsForInputValue={this.getOptionsForInputValue}\n        onChange={this.handleChange}\n        value={this.state.value}\n      /\u003e\n      \u003cp\u003eSelection: {this.state.value}\u003c/p\u003e\n    \u003c/div\u003e\n  }\n\n});\n```\n\nCheck out more [examples](https://github.com/hellojwilde/react-pick/tree/master/examples).\n\n### What sorts of components can you build with it?\n\n- [react-pick-datetime](https://github.com/hellojwilde/react-pick-datetime) - Components for selecting dates and times.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellojwilde%2Freact-pick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellojwilde%2Freact-pick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellojwilde%2Freact-pick/lists"}