{"id":18961956,"url":"https://github.com/lamualfa/spectre-auto-complete","last_synced_at":"2025-09-18T22:35:14.449Z","repository":{"id":57367226,"uuid":"201967830","full_name":"lamualfa/spectre-auto-complete","owner":"lamualfa","description":"Autocomplete library for spectre css framework https://picturepan2.github.io/spectre/","archived":false,"fork":false,"pushed_at":"2019-08-18T10:53:51.000Z","size":26,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-27T01:35:49.750Z","etag":null,"topics":["autocomplete","autocomplete-library","css","spectre"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/lamualfa.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}},"created_at":"2019-08-12T16:26:25.000Z","updated_at":"2024-08-19T07:49:22.000Z","dependencies_parsed_at":"2022-08-23T19:40:22.026Z","dependency_job_id":null,"html_url":"https://github.com/lamualfa/spectre-auto-complete","commit_stats":null,"previous_names":["laodemalfatih/spectre-auto-complete"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lamualfa/spectre-auto-complete","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fspectre-auto-complete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fspectre-auto-complete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fspectre-auto-complete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fspectre-auto-complete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lamualfa","download_url":"https://codeload.github.com/lamualfa/spectre-auto-complete/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fspectre-auto-complete/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275844495,"owners_count":25538992,"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","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","autocomplete-library","css","spectre"],"created_at":"2024-11-08T14:14:48.924Z","updated_at":"2025-09-18T22:35:14.393Z","avatar_url":"https://github.com/lamualfa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spectre-auto-complete\n\nAutocomplete library for spectre css framework https://picturepan2.github.io/spectre/\n\n### Instalation:\n\n#### Requirement:\n\n- JQuery 3.x\n- Spectre 0.5.x\n\n#### CDN:\n\n[![](https://data.jsdelivr.com/v1/package/npm/spectre-auto-complete/badge)](https://www.jsdelivr.com/package/npm/spectre-auto-complete)\n\n```\nhttps://cdn.jsdelivr.net/npm/spectre-auto-complete@latest/spectre-auto-complete.min.css\nhttps://cdn.jsdelivr.net/npm/spectre-auto-complete@latest/spectre-auto-complete.min.js\n```\n\n#### Example:\n\n```html\n\u003chtml\u003e\n  \u003cheader\u003e\n    \u003c!-- spectre --\u003e\n    \u003clink rel=\"stylesheet\" href=\"spectre.min.css\" /\u003e\n    \u003clink rel=\"stylesheet\" href=\"spectre-exp.min.css\" /\u003e\n    \u003clink rel=\"stylesheet\" href=\"spectre-icons.min.css\" /\u003e\n\n    \u003c!-- spectre-auto-complete CSS --\u003e\n    \u003clink\n      rel=\"stylesheet\"\n      href=\"https://cdn.jsdelivr.net/npm/spectre-auto-complete@latest/spectre-auto-complete.min.css\"\n    /\u003e\n  \u003c/header\u003e\n  \u003cbody\u003e\n    \u003c!-- JQuery --\u003e\n    \u003cscript src=\"jquery-3.x.min.js\"\u003e\u003c/script\u003e\n\n    \u003c!-- spectre-auto-complete JS --\u003e\n    \u003cscript src=\"https://cdn.jsdelivr.net/npm/spectre-auto-complete@latest/spectre-auto-complete.min.js\"\u003e\u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Usage:\n\n**HTML**\n\n```html\n\u003cdiv class=\"form-group\"\u003e\n  \u003cdiv class=\"form-autocomplete\"\u003e\n    \u003cinput class=\"form-input form-autocomplete-input\" /\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n**Javascript**\n\n```javascript\n$(\".form-autocomplete\").autoComplete({\n  source: function(inputValue, callback) {\n    // Do something like fetch data with xhr\n    var data = [\"apple\", \"banana\", \"guava\"];\n\n    callback(data, null); // If error, you can use callback(null, error); . Error will passed as argument to error handler\n  }\n});\n```\n\n### Options arguments:\n\n```javascript\noptions[\"source\"] = options.source || [];\noptions[\"render\"] = options.render || defaultRender;\noptions[\"error\"] = options.error || console.error;\n\noptions[\"delay\"] = options.delay || 0;\noptions[\"minChar\"] = options.minChar || 0;\noptions[\"menuClass\"] = options.menuClass || \"\";\noptions[\"menuItemClass\"] = options.menuItemClass || \"\";\n\noptions[\"empty\"] = options.empty || \"Not Found\";\n\noptions[\"cache\"] = options.cache || false;\noptions[\"clearCacheInterval\"] = options.clearCacheInterval || 1000 * 60 * 10;\n\noptions[\"runOnFocus\"] = options.runOnFocus || true;\n```\n\n### HANDLER\n\n- `source(value, callback, $container, $inpt, opts)` :\n\n  - `value` : The value of `$inpt` element.\n  - `callback(data, error)` :\n    - `data` : Data will process to `render` handler.\n    - `error` : Error\n  - `$container` : JQuery element of the first initialize with `$container.autoComplete(opts)`.\n  - `$inpt` : JQuery element of the input element inside `$container`.\n  - `opts` : Options\n\n- `render(value, data, $inpt, $menu, opts)` :\n  - `data` : Data from `callback(data)` in `source`.\n  - `$menu` : JQuery element from container of autocomplete.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamualfa%2Fspectre-auto-complete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flamualfa%2Fspectre-auto-complete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamualfa%2Fspectre-auto-complete/lists"}