Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blankeos/bagon-hooks
🦕 A collection of zero-dependency hooks for SolidJS forked directly from Mantine Hooks.
https://github.com/blankeos/bagon-hooks
Last synced: 4 days ago
JSON representation
🦕 A collection of zero-dependency hooks for SolidJS forked directly from Mantine Hooks.
- Host: GitHub
- URL: https://github.com/blankeos/bagon-hooks
- Owner: Blankeos
- License: mit
- Created: 2024-09-28T22:26:49.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-10-05T16:35:41.000Z (about 1 month ago)
- Last Synced: 2024-10-05T17:59:12.390Z (about 1 month ago)
- Language: TypeScript
- Size: 156 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# bagon-hooks
A collection of zero-dependency hooks for SolidJS forked directly from Mantine Hooks.
## Quick start
Install it:
```bash
npm i bagon-hooks
# or
yarn add bagon-hooks
# or
pnpm add bagon-hooks
# or
bun add bagon-hooks
```Use it:
```tsx
import { useHotkeys } from 'bagon-hooks';
```We 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/).
## Features
- 🌳 Tree-shakable
- 🖌️ TypeScript support
- 🔵 For SolidJS
- 📦 Zero-dependencies (except Solid)## Roadmap
### Hooks
Based on the [@mantine/hooks](https://github.com/mantinedev/mantine/tree/master/packages/%40mantine/hooks/src) library.
- [ ] use-callback-ref
- [x] use-click-outside
- [ ] use-clipboard
- [ ] use-color-scheme
- [x] use-counter
- [ ] use-debounced-callback
- [ ] use-debounced-state
- [ ] use-debounced-value
- [ ] use-did-update
- [ ] use-disclosure
- [ ] use-document-title
- [ ] use-document-visibility
- [ ] use-event-listener
- [x] use-eye-dropper (improved, state management is inside the hook)
- [x] use-favicon (improved, more flexible)
- [ ] use-fetch
- [ ] use-focus-return
- [ ] use-focus-trap
- [ ] use-focus-within
- [ ] use-force-update
- [ ] use-fullscreen
- [ ] use-hash
- [ ] use-headroom
- [x] use-hotkeys
- [x] use-hover
- [x] ~~use-id~~ (Solid has [`createUniqueId`](https://docs.solidjs.com/reference/component-apis/create-unique-id))
- [x] use-idle (Added, but note that there is [`createIdleTimer`](https://primitives.solidjs.community/package/idle/) solid-primitives as well)
- [ ] use-in-viewport
- [ ] use-input-state
- [ ] use-intersection
- [ ] use-interval
- [ ] use-is-first-render
- [x] ~~use-isomorphic-effect~~ (Solid's [`createEffect`](https://docs.solidjs.com/reference/basic-reactivity/create-effect) is actually isomorphic - it works in browser and server).
- [ ] use-list-state
- [x] use-local-storage
- [ ] use-logger
- [ ] use-map
- [ ] use-media-query
- [ ] use-merged-ref
- [x] use-mounted
- [ ] use-mouse
- [ ] use-move
- [ ] use-mutation-observer
- [x] use-network
- [ ] use-orientation
- [x] use-os
- [ ] use-page-leave
- [ ] use-pagination
- [ ] use-previous
- [ ] use-queue
- [ ] use-reduced-motion
- [x] use-resize-observer
- [ ] use-scroll-into-view
- [ ] use-session-storage
- [ ] use-set-state
- [ ] use-set
- [ ] use-shallow-effect
- [ ] use-state-history
- [ ] use-text-selection
- [ ] use-throttled-callback
- [ ] use-throttled-state
- [ ] use-throttled-value
- [ ] use-timeout
- [x] use-toggle
- [ ] use-uncontrolled
- [ ] use-validated-state
- [ ] use-viewport-size
- [ ] use-window-event
- [ ] use-window-scroll
- [ ] utils### Others
- [ ] Docs Website (Powered by mdx + tailwind prose)
- [ ] Examples
- [ ] Tests?## Contributing
This 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! ⭐️
## License
This project is licensed under the [MIT License](https://github.com/omsimos/react-highlight-popover/blob/main/LICENSE)
## Credits
- [Mantine Hooks](https://v3.mantine.dev/) - amazing library for components and hooks, but currently not in SolidJS so we forked that part only.