{"id":16641787,"url":"https://github.com/samthor/advanced-input","last_synced_at":"2025-10-30T11:31:17.360Z","repository":{"id":57173756,"uuid":"169826678","full_name":"samthor/advanced-input","owner":"samthor","description":"Advanced \u003cinput\u003e or \u003ctextarea\u003e elements","archived":false,"fork":false,"pushed_at":"2021-11-21T21:25:54.000Z","size":122,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-02T08:11:19.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://samthor.github.io/advanced-input/demo/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samthor.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}},"created_at":"2019-02-09T03:08:43.000Z","updated_at":"2023-01-06T16:07:27.000Z","dependencies_parsed_at":"2022-08-24T13:31:08.653Z","dependency_job_id":null,"html_url":"https://github.com/samthor/advanced-input","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/samthor%2Fadvanced-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Fadvanced-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Fadvanced-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Fadvanced-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samthor","download_url":"https://codeload.github.com/samthor/advanced-input/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238960260,"owners_count":19559228,"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-10-12T07:47:51.614Z","updated_at":"2025-10-30T11:31:12.104Z","avatar_url":"https://github.com/samthor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Library which provides the `\u003cadvanced-input\u003e` Web Component, to enable autocomplete, custom annotations/markup, and retaining user selection even without foucs.\n\nThis is ideal for \"hero\" inputs: e.g., a primary search box, composing email, or entering a chat message.\nAs seen [on Twitter](https://twitter.com/samthor/status/1101283110186967042).\n\n🚨 **This is unpolished** and should only be used for experiments!\n[Try the demo](https://samthor.github.io/advanced-input/demo/)!\n\n## Usage\n\nInstall on Yarn/NPM via `advanced-input`.\n\nThe Web Component is somewhat opinionated and describes its own styling and annotates words under your cursor with a subtle highlight (as per the Twitter demo above).\n\nAdd the dependency to your JS and register it as a CE:\n\n```js\nimport * as advancedInput from 'advanced-input';\nconst ai = /** @type {advancedInput.AdvancedInputElement} */ (document.createElement('advanced-input'));\n```\n\nThen add the element to your page, optionally adding the `multiline` attribute for a multiline text input:\n\n```html\n\u003cadvanced-input multiline value=\"Hello\" suggest=\" There\"\u003e\u003c/advanced-input\u003e\n```\n\nThe CE emits a number of events, whose names are under `advancedInput.eventNames`:\n\n* `change` when the user types something\n* `select` when the user's selection changes\n* `nav` when the user attempts to go up/down from the contents\n* `spaceKey` when the user presses space\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Fadvanced-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamthor%2Fadvanced-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Fadvanced-input/lists"}