{"id":18160707,"url":"https://github.com/blankeos/bagon-hooks","last_synced_at":"2025-05-07T08:45:33.994Z","repository":{"id":257804132,"uuid":"864688907","full_name":"Blankeos/bagon-hooks","owner":"Blankeos","description":"🦕 A collection of zero-dependency hooks for SolidJS forked directly from Mantine Hooks.","archived":false,"fork":false,"pushed_at":"2025-02-25T16:36:52.000Z","size":738,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T09:14:26.297Z","etag":null,"topics":["hooks","mantine","mantine-hooks","solid","solid-js","solidjs","vike-solid"],"latest_commit_sha":null,"homepage":"https://bagon-hooks.pages.dev","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/Blankeos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2024-09-28T22:26:49.000Z","updated_at":"2025-03-03T23:46:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"88c64b1d-00dc-4ec2-8ba6-6ce400a43e84","html_url":"https://github.com/Blankeos/bagon-hooks","commit_stats":null,"previous_names":["blankeos/bagon-hooks"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blankeos%2Fbagon-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blankeos%2Fbagon-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blankeos%2Fbagon-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blankeos%2Fbagon-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blankeos","download_url":"https://codeload.github.com/Blankeos/bagon-hooks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252846452,"owners_count":21813425,"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":["hooks","mantine","mantine-hooks","solid","solid-js","solidjs","vike-solid"],"created_at":"2024-11-02T08:09:05.866Z","updated_at":"2025-05-07T08:45:33.974Z","avatar_url":"https://github.com/Blankeos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp\u003e\n  \u003cimg width=\"100%\" src=\"https://assets.solidjs.com/banner?type=bagon-hooks\u0026background=tiles\u0026project=%20\" alt=\"bagon-hooks\"\u003e\n\u003c/p\u003e\n\n# bagon-hooks\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/maintained%20with-bun-cc00ff.svg?style=for-the-badge\u0026logo=bun)](https://bun.sh/\" alt=\"Bun\"\u003e\u003c/img\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dw/bagon-hooks?style=for-the-badge\" alt=\"NPM Downloads\"\u003e\u003c/img\u003e\n  \u003cimg src=\"https://img.shields.io/npm/l/bagon-hooks?style=for-the-badge\" alt=\"NPM License\"\u003e\u003c/img\u003e\n  \u003cimg src=\"https://img.shields.io/bundlephobia/minzip/bagon-hooks?style=for-the-badge\" alt=\"NPM Bundle Size\" \u003e\u003c/img\u003e\n\u003c/div\u003e\n\nA collection of zero-dependency hooks for SolidJS forked directly from Mantine Hooks.\n\n## Quick start\n\nInstall it:\n\n```bash\nnpm i bagon-hooks\n# or\nyarn add bagon-hooks\n# or\npnpm add bagon-hooks\n# or\nbun add bagon-hooks\n```\n\nUse it:\n\n```tsx\nimport { useHotkeys } from 'bagon-hooks';\n```\n\nWe want to achieve as 1:1 as possible with Mantine's original hooks. So you can always refer to their [original docs](https://v3.mantine.dev/hooks/use-hotkeys/). There are a few improvements and renaming because SolidJS has its own conventions. But just take note:\n\n1. We removed Solid's convention of `use` vs `create` as it's too confusing for familiarity with Mantine. So every hook in Bagon is prefixed with `use`.\n2. The only renaming we did was `state` -\u003e `signal`.\n3. Refer to [Mantine](https://mantine.dev/hooks/use-click-outside/)'s original docs for deeper examples and usecases.\n4. Refer to [Bagon Hooks](https://bagon-hooks.pages.dev/)'s docs for actual SolidJS examples.\n\n## Features\n\n- 🌳 Tree-shakable\n- 🖌️ TypeScript support\n- 🔵 For SolidJS\n- 📦 Zero-dependencies (except Solid)\n\n## Roadmap\n\n### Hooks\n\nBased on the [@mantine/hooks](https://github.com/mantinedev/mantine/tree/master/packages/%40mantine/hooks/src) library.\n\n- [x] ~~use-callback-ref~~ (Not needed, only used internally by mantine for preventing re-renders on a function)\n- [x] use-click-outside\n- [x] use-clipboard\n- [x] use-color-scheme\n- [x] use-counter\n- [x] use-debounced-callback\n- [x] ~~use-debounced-state~~ use-debounced-signal\n- [x] use-debounced-value\n- [x] use-did-update\n- [ ] use-disclosure\n- [x] use-document-title\n- [x] use-document-visibility\n- [ ] use-event-listener\n- [x] use-eye-dropper (✨ improved, state management is inside the hook)\n- [x] use-favicon (✨ improved, more flexible, better control)\n- [ ] use-fetch\n- [ ] use-focus-return\n- [ ] use-focus-trap\n- [ ] use-focus-within\n- [ ] use-force-update\n- [x] use-fullscreen\n- [x] use-hash\n- [ ] use-headroom\n- [x] use-hotkeys\n- [x] use-hover\n- [x] use-id (Added, but note that there is [`createUniqueId`](https://docs.solidjs.com/reference/component-apis/create-unique-id) in Solid)\n- [x] use-idle (Added, but note that there is [`createIdleTimer`](https://primitives.solidjs.community/package/idle/) the official solid-primitives as well)\n- [x] use-in-viewport\n- [x] use-input-state\n- [x] use-intersection (Added, but note that there is [`createIntersectionObserver`](https://primitives.solidjs.community/package/intersection-observer/) in the official solid-primitives as well)\n- [ ] use-interval\n- [x] ~~use-is-first-render~~ (Every component function in SolidJS runs only once! Every component is first render only 🙂)\n- [x] ~~use-isomorphic-effect~~ (Solid's [`createEffect`](https://docs.solidjs.com/reference/basic-reactivity/create-effect) is technically already isomorphic because it doesn't error on SSR. Also, it also only runs on client-side.)\n- [ ] use-list-state\n- [x] use-local-storage\n- [x] use-local-storage-store (✨ Improved, more similar to 'createStore' API).\n- [ ] use-logger\n- [ ] use-map\n- [x] use-media-query\n- [ ] use-merged-ref\n- [x] use-mounted\n- [x] use-mouse\n- [x] use-move\n- [ ] use-mutation-observer\n- [x] use-network\n- [x] use-orientation\n- [x] use-os\n- [ ] use-page-leave\n- [ ] use-pagination\n- [ ] use-previous\n- [ ] use-queue\n- [ ] use-reduced-motion\n- [x] use-resize-observer\n- [ ] use-scroll-into-view\n- [ ] use-session-storage\n- [ ] use-set-state\n- [ ] use-set\n- [ ] use-shallow-effect\n- [ ] use-state-history\n- [ ] use-text-selection\n- [ ] use-throttled-callback\n- [ ] use-throttled-state\n- [ ] use-throttled-value\n- [ ] use-timeout\n- [x] use-toggle\n- [ ] use-uncontrolled\n- [ ] use-validated-state\n- [ ] use-viewport-size\n- [ ] use-window-event\n- [ ] use-window-scroll\n- [ ] utils\n\n### New in Bagon Hooks\n\n- [x] use-keyboard\n\n### Others\n\n- [x] Docs Website (Powered by mdx + tailwind prose)\n- [x] Examples\n- [ ] Tests?\n\n## Contributing\n\nThis library is far from done. If you have time implementing the roadmap, feel free to submit a pull request. We always appreciate collaborators. If you find anything outdated, please make an issue. If you like this project, consider giving it a star! ⭐️\n\n## License\n\nThis project is licensed under the [MIT License](https://github.com/omsimos/react-highlight-popover/blob/main/LICENSE)\n\n## Credits\n\n- [Mantine Hooks](https://v3.mantine.dev/) - amazing library for components and hooks, but currently not in SolidJS so we forked that part only.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblankeos%2Fbagon-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblankeos%2Fbagon-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblankeos%2Fbagon-hooks/lists"}