{"id":36632513,"url":"https://github.com/eldomagan/alpine-headless-ui","last_synced_at":"2026-01-12T09:39:59.716Z","repository":{"id":328964325,"uuid":"1117560254","full_name":"eldomagan/alpine-headless-ui","owner":"eldomagan","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-16T13:41:28.000Z","size":151,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-20T03:35:52.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://alpine-headless-ui.netlify.app","language":"TypeScript","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/eldomagan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-16T13:39:36.000Z","updated_at":"2025-12-16T14:18:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/eldomagan/alpine-headless-ui","commit_stats":null,"previous_names":["eldomagan/alpine-headless-ui"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/eldomagan/alpine-headless-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldomagan%2Falpine-headless-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldomagan%2Falpine-headless-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldomagan%2Falpine-headless-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldomagan%2Falpine-headless-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldomagan","download_url":"https://codeload.github.com/eldomagan/alpine-headless-ui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldomagan%2Falpine-headless-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-12T09:39:59.628Z","updated_at":"2026-01-12T09:39:59.709Z","avatar_url":"https://github.com/eldomagan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alpine Headless UI\n\nHeadless, accessible UI primitives for Alpine.js, built with [`https://github.com/eldomagan/alpine-define-component`](https://github.com/eldomagan/alpine-define-component).\n\nThis library provides unstyled, behavior-only components inspired by:\n\n* [Alpine UI components documentation](https://alpinejs.dev/components)\n* [Zag.js behavior and accessibility patterns](https://zagjs.com/)\n\nThe goal is to give you composable Alpine components with correct state management, keyboard interactions, and ARIA attributes, while leaving all styling and markup control to you.\n\n---\n\n## Features\n\n* Headless (no styles, no markup assumptions)\n* Accessible by default (keyboard and ARIA patterns applied)\n* Per-component imports\n* Built on Alpine.js v3\n\n---\n\n## Installation\n\n```bash\nnpm install alpine-headless-ui\n```\n\n## Getting started\n\n### Register all components\n\n```js\nimport Alpine from 'alpinejs'\nimport AlpineHeadlessUI from 'alpine-headless-ui'\n\nAlpine.plugin(AlpineHeadlessUI)\nAlpine.start()\n```\n\nThis registers all available headless ui components globally.\n\n---\n\n### Register individual components\n\nYou can import and register only the components you need.\n\n```js\nimport Alpine from 'alpinejs'\nimport dialog from 'alpine-headless-ui/dialog'\nimport menu from 'alpine-headless-ui/menu'\n\nAlpine.plugin(dialog)\nAlpine.plugin(menu)\nAlpine.start()\n```\n\nThis keeps your bundle size minimal.\n\n---\n\n## Component usage\n\nAll components follow the same pattern:\n\n* A root element using `x-\u003ccomponent\u003e`\n* Named parts using `x-\u003ccomponent\u003e:\u003cpart\u003e`\n* Optional scoped sub-parts for repeated items\n\nThe exact HTML structure is up to you.\n\n---\n\n## Dialog\n\n### Example\n\n```html\n\u003cdiv x-dialog\u003e\n  \u003cbutton x-dialog:trigger\u003eOpen Dialog\u003c/button\u003e\n\n  \u003cdiv x-dialog:backdrop\u003e\u003c/div\u003e\n\n  \u003cdiv x-dialog:positioner\u003e\n    \u003cdiv x-dialog:content\u003e\n      \u003ch2 x-dialog:title\u003eDialog Title\u003c/h2\u003e\n      \u003cp x-dialog:description\u003e\n        This is a basic dialog example. Click outside or press Escape to close.\n      \u003c/p\u003e\n      \u003cbutton x-dialog:close-trigger\u003eClose\u003c/button\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n### Behavior\n\n* Focus is trapped inside the dialog when open\n* Escape closes the dialog\n* Focus returns to the trigger on close\n* Backdrop click closes the dialog\n* Body scroll prevented when open\n\n---\n\n## Accessibility\n\nAlpine Headless UI components aim to follow WAI-ARIA authoring practices:\n\n* Correct roles (`dialog`, `menu`, `combobox`, etc.)\n* Keyboard interactions matching platform expectations\n* Focus management on open and close\n\nBehavior patterns are inspired by Zag.js state machines, adapted to Alpine idioms.\n\nYou are responsible for:\n\n* Visual focus styles\n* Animations and transitions\n* Layout and spacing\n\n## Credits\n\nInspired by:\n- [Zag.js](https://zagjs.com/) - State machine patterns for accessible components\n- [alpine-zag](https://github.com/TunkShif/alpine-zag) - Alpine.js integration with Zag.js\n\nCreated by:\n- [Eldo Magan](https://github.com/eldomagan)\n- [All Contributors](../../contributors)\n\n## 📄 License\n\nThis project is open-sourced under the [MIT license](./LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldomagan%2Falpine-headless-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldomagan%2Falpine-headless-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldomagan%2Falpine-headless-ui/lists"}