{"id":18759406,"url":"https://github.com/yujinlim/react-autocomplete","last_synced_at":"2025-12-02T21:30:14.139Z","repository":{"id":30542038,"uuid":"34096714","full_name":"yujinlim/react-autocomplete","owner":"yujinlim","description":null,"archived":false,"fork":false,"pushed_at":"2015-05-25T04:23:41.000Z","size":1528,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T03:55:14.684Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/yujinlim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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-04-17T04:36:23.000Z","updated_at":"2015-04-17T06:51:13.000Z","dependencies_parsed_at":"2022-09-22T12:52:43.762Z","dependency_job_id":null,"html_url":"https://github.com/yujinlim/react-autocomplete","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yujinlim%2Freact-autocomplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yujinlim%2Freact-autocomplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yujinlim%2Freact-autocomplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yujinlim%2Freact-autocomplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yujinlim","download_url":"https://codeload.github.com/yujinlim/react-autocomplete/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239652954,"owners_count":19675004,"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-11-07T17:51:47.948Z","updated_at":"2025-12-02T21:30:14.060Z","avatar_url":"https://github.com/yujinlim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-autocomplete (combobox) \n\u003e Moving from [rackt/react-autocomplete](https://github.com/rackt/react-autocomplete).\n\n[WAI-ARIA][wai-aria] accessible [React][react] autocomplete component (combobox).\n\nInstallation\n------------\n\n`npm install react-autocomplete`\n\nWIP\n---\n\nThis is not production ready, but I welcome use-cases opened in the\nissues :)\n\nDemo\n----\n\nhttp://rackt.github.io/react-autocomplete/example/\n\nUsage\n-----\n\n```js\nvar Autocomplete = require('react-autocomplete');\n\n// its actually called a combobox, but noboby searches for that\nvar Combobox = Autocomplete.Combobox; \nvar Option = Autocomplete.Option;\n\nvar comboboxinItUp = (\n\n  // Just like \u003cselect\u003e\u003coption/\u003e\u003c/select\u003e, this component is a\n  // composite component. This gives you complete control over\n  // What is displayed inside the \u003cOption\u003es as well as allowing\n  // you to render whatever you want inside, like a \"no results\"\n  // message that isn't interactive like the \u003cOptions\u003e are.\n\n  // Start with the \u003cCombobox/\u003e and give it some handlers.\n\n  \u003cCombobox\n    onInput={handleInput}\n    onSelect={handleSelect}\n    autocomplete=\"both\"\n  \u003e\n\n    // `onInput` is called when the user is typing, it gets passed the\n    // value from the input. This is your chance to filter the Options\n    // and redraw. More realistically, you'd make a request to get data\n    // and then redraw when it lands.\n    //\n    // `onSelect` is called when the user makes a selection, you probably\n    // want to reset the Options to your full dataset again, or maybe\n    // deal with the value and then clear it out if this is used to\n    // populate a list.\n    //\n    // `autocomplete` defaults to 'both'. 'inline' will autocomplete the\n    // first matched Option into the input value, 'list' will display a\n    // list of choices, and of course, both does both.\n \n    // When this option is selected, `onSelect` will be called with the\n    // value `\"foo\"`.\n    \u003cOption value=\"foo\"\u003eFoo\u003c/Option\u003e\n\n    // `label` is the text to display in the input when the Option is\n    // selected. It defaults to the content of the Option just like a\n    // real \u003coption\u003e. (Maybe the value should too, now that I'm writing\n    // this, but it doesn't yet)\n    \u003cOption value=\"bar\" label=\"not bar at all\"\u003eBar\u003c/Option\u003e\n  \u003c/Combobox\u003e\n);\n```\n\nThis is not realistic code, check out the examples directory for a real\nimplementation.\n\n  [wai-aria]:http://www.w3.org/TR/wai-aria/roles#combobox\n  [react]:http://facebook.github.io/react/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyujinlim%2Freact-autocomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyujinlim%2Freact-autocomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyujinlim%2Freact-autocomplete/lists"}