{"id":29960290,"url":"https://github.com/antrikshy/solid-suggest","last_synced_at":"2025-10-14T06:33:56.619Z","repository":{"id":300638669,"uuid":"1004690968","full_name":"Antrikshy/solid-suggest","owner":"Antrikshy","description":"Barebones, headless SolidJS component for textbox dropdowns, like for search suggestions","archived":false,"fork":false,"pushed_at":"2025-08-02T23:12:55.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-02T23:24:00.785Z","etag":null,"topics":["dropdown","search-suggestions","solidjs","solidjs-component","ui-component"],"latest_commit_sha":null,"homepage":"https://antrikshy.com/solid-suggest/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Antrikshy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-06-19T03:15:32.000Z","updated_at":"2025-08-02T23:12:58.000Z","dependencies_parsed_at":"2025-06-22T21:17:47.130Z","dependency_job_id":"b7a1eab7-4e65-4ef1-a008-19098cf6a437","html_url":"https://github.com/Antrikshy/solid-suggest","commit_stats":null,"previous_names":["antrikshy/solid-suggest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Antrikshy/solid-suggest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antrikshy%2Fsolid-suggest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antrikshy%2Fsolid-suggest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antrikshy%2Fsolid-suggest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antrikshy%2Fsolid-suggest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Antrikshy","download_url":"https://codeload.github.com/Antrikshy/solid-suggest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antrikshy%2Fsolid-suggest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268619506,"owners_count":24279384,"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-08-03T02:00:12.545Z","response_time":2577,"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":["dropdown","search-suggestions","solidjs","solidjs-component","ui-component"],"created_at":"2025-08-03T22:09:29.257Z","updated_at":"2025-10-14T06:33:51.573Z","avatar_url":"https://github.com/Antrikshy.png","language":"TypeScript","readme":"# solid-suggest\n\n[![NPM](https://nodei.co/npm/solid-suggest.png)](https://npmjs.org/package/solid-suggest)\n\nsolid-suggest is a UI component for SolidJS developers that renders a text input with dropdown suggestions. It can be used in scenarios such as search suggestions or results triggered by text input.\n\nIt's a *super* simple library without many batteries included. See following sections for what it can and can't do for you.\n\n**Because of its simplicity, I also expect it to be usable even without updates for years.**\n\n## Quickstart\n\nInstall from the npm registry using `npm` or your favorite alternate package manager (yarn, pnpm).\n\n```\nnpm install solid-suggest --save\n```\n\nImport into your SolidJS project.\n\n```\nimport Suggest from \"solid-suggest\";\n\nconst items = [\n  { name: \"Scout\", class: \"Offense\" },\n  { name: \"Medic\", class: \"Support\" },\n  { name: \"Heavy\", class: \"Defense\" }\n];\n\n\u003cSuggest\n  renderSuggestion={item =\u003e `${item.name} (${item.class})`}\n  onQuery={query =\u003e\n    items.filter(\n      item =\u003e\n        item.name.toLowerCase().includes(query.toLowerCase()) ||\n        item.class.toLowerCase().includes(query.toLowerCase())\n    )\n  }\n  onSelect={item =\u003e setSelected(item.name)}\n/\u003e\n```\n\nSee more [in the docs](https://antrikshy.com/solid-suggest).\n\n## What it Does\n\nExposes two main interfaces as functions that you implement:\n\n1. `onQuery` - solid-suggest runs it on initial render and on each user input change. For solid-suggest, your implementation answers the question \"what suggestions should solid-suggest show in the current state?\"\n2. `onSelect` - solid-suggest invokes this to emit the user's selection to your code.\n\nAll this library does is provide JavaScript/TypeScript bones for a suggestions dropdown so that you don't have to clutter your application with the required internal states, keyboard and mouse handling, etc.\n\n- Supports objects as suggestions (not just strings), with support for custom rendering of each suggestion.\n- Supports optional debouncing of user input via the `debounceMs` prop (in milliseconds). If not set or zero, input is not debounced.\n- Styling is still supplied by you.\n\nSome more questions are answered [in the docs](https://antrikshy.com/solid-suggest).\n\n## What it Doesn't Do\n\n1. Come with *any* styling. solid-suggest is a **headless** library that completely relies on the you to style. This way, it fully integrates with any branding and design system.\n2. Provide built-in network fetch capabilities. You are free to make network calls this in their `onQuery` implementations. Consider supplying a `debounceMs` value to reduce network calls.\n3. Wash your car.\n\nSome more questions are answered [in the docs](https://antrikshy.com/solid-suggest).\n\n## Docs + Recommendations\n\nFind [documentation and tips here](https://antrikshy.com/solid-suggest).\n\n## Development\n\n```\nnpm install\n```\n\n... before anything else.\n\n```\nnpm run devOnly\n```\n\n... runs a continuous watcher for changes to *library code* that transpiles TypeScript to a dist/ dir at project top level.\n\n```\nnpm run devDemo\n```\n\n... runs a local server that you can use to see and iterate on the demo page at http://localhost:8000/docs/index.htm. This is a basic HTML page that imports some libraries from CDNs. Hot reload/replacement is not enabled, so it needs manual refreshing.\n\n```\nnpm run devWithDemo\n```\n\n... runs both of the above at the same time.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantrikshy%2Fsolid-suggest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantrikshy%2Fsolid-suggest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantrikshy%2Fsolid-suggest/lists"}