{"id":15572966,"url":"https://github.com/gch1p/bootstrap-5-autocomplete","last_synced_at":"2025-08-20T16:31:38.881Z","repository":{"id":41277723,"uuid":"326491255","full_name":"gch1p/bootstrap-5-autocomplete","owner":"gch1p","description":"autocomplete/typeahead js plugin for bootstrap v5","archived":false,"fork":false,"pushed_at":"2023-03-19T02:58:10.000Z","size":37,"stargazers_count":104,"open_issues_count":16,"forks_count":35,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-10T02:20:25.472Z","etag":null,"topics":["autocomplete","bootstrap","bootstrap5","typeahead"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gch1p.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-01-03T20:06:26.000Z","updated_at":"2024-11-06T01:59:14.000Z","dependencies_parsed_at":"2024-10-31T21:03:11.545Z","dependency_job_id":"cfd50e67-1358-4e5f-8ab1-7590e9502d57","html_url":"https://github.com/gch1p/bootstrap-5-autocomplete","commit_stats":{"total_commits":22,"total_committers":6,"mean_commits":"3.6666666666666665","dds":0.6818181818181819,"last_synced_commit":"c32bcecacb0004564bd0a767f37e628b5de122c1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gch1p%2Fbootstrap-5-autocomplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gch1p%2Fbootstrap-5-autocomplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gch1p%2Fbootstrap-5-autocomplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gch1p%2Fbootstrap-5-autocomplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gch1p","download_url":"https://codeload.github.com/gch1p/bootstrap-5-autocomplete/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230438185,"owners_count":18225870,"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":["autocomplete","bootstrap","bootstrap5","typeahead"],"created_at":"2024-10-02T18:09:06.571Z","updated_at":"2024-12-19T13:07:31.053Z","avatar_url":"https://github.com/gch1p.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bootstrap-5-autocomplete\n\nThis is a rewrite of https://github.com/Honatas/bootstrap-4-autocomplete for bootstrap v5.\n\n### Example\n\n```js\nconst ac = new Autocomplete(field, {\n    data: [{label: \"I'm a label\", value: 42}],\n    maximumItems: 5,\n    onSelectItem: ({label, value}) =\u003e {\n        console.log(\"user selected:\", label, value);\n    }\n});\n\n// later, when you need to change the dataset\n\nac.setData([\n    {label: 'New York JFK', value: 'JFK'},\n    {label: 'Moscow SVO', value: 'SVO'},\n]);\n```\n\n\nOr use custom label/value keys:\n```js\nconst ac = new Autocomplete(field, {\n    data: [{name: \"entry1\", text: \"The first entry\"}, {name: \"entry2\", text: \"The second entry\"}],\n    label: \"name\",\n    value: \"text\",\n    onSelectItem: ({label, value}) =\u003e {\n        console.log(\"user selected:\", label, value);\n    }\n});\n```\n\nOr use a simple object instead of an array of objects:\n```js\nconst ac = new Autocomplete(field, {\n    data: {entry1: \"The first entry\", entry2: \"The second entry\"},\n    label: null,\n    value: null,\n    onSelectItem: ({label, value}) =\u003e {\n        console.log(\"user selected:\", label, value);\n    }\n});\n```\n\n### Options\n\nOptions is a JSON object with the following attributes (in alphabetical order):\n\n**data**:  \nThe data from where autocomplete will lookup items to show. This data can be a simple object or an array of JSON objects. By default the format for every object in the array is as following, but you can also change the name of the label and value keys (see below):\n\n    {\"label\": \"This is a text\", \"value\": 42}\n\n**dropdownOptions**:  \nIt's the same options from Bootstrap's Dropdown, documented [here](https://getbootstrap.com/docs/5.0/components/dropdowns/#options).\n\n**dropdownClass**:  \nThe class of the dropdown-menu element, which is the box that is displayed. Can take a string or an array of strings.\n\n**highlightClass**:  \nThe class to use when highlighting typed text on items. Only used when highlightTyped is true. Default is text-primary. Can take a string or an array of strings.\n\n**highlightTyped**:  \nWhether to highlight (style) typed text on items. Default is true.\n\n**label**:  \nThe name of the `label` key in your data. The label is what will be shown on each item in the autocomplete list.\n\n**maximumItems**:  \nHow many items you want to show when the autocomplete is displayed. Default is 5. Set to 0 to display all available items.\n\n**onInput**:  \nA callback function to execute on user input.\n\n**onSelectItem**:  \nA callback that is fired every time an item is selected. It receives an object in following format:\n    \n    {label: \u003clabel\u003e, value: \u003cvalue\u003e}\n\n**showValue**:  \nIf set to true, will display the value of the entry after the label in the dropdown list.\n\n**showValueBeforeLabel**:  \nIf set to true and `showValue` also set to true, the value will be displayed before the label.\n\n**threshold**:  \nThe number of characters that need to be typed on the input in order to trigger the autocomplete. Default is 4.\n\n**value**:  \nThe name of the `value` key in your data.\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgch1p%2Fbootstrap-5-autocomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgch1p%2Fbootstrap-5-autocomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgch1p%2Fbootstrap-5-autocomplete/lists"}