0.0.4-1 • Published 2 years ago

solidjs-composables v0.0.4-1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Solid Composables

Collection of essential Solidjs composition utilities

📦 Install

npm i -S solidjs-composables
# or
yarn add solidjs-composables

Composable functions

Status

  • ✅ = Implemented
  • ⏩ = Coming next
  • ☠️ = Deprecating soon

Functions

  • Logical
    • useAtom - utility for using one variable for get/set Accessors;
    • useToggle - a boolean switcher with utility functions;
  • Browser
    • useEventListener - event listener that unsubscribe on cleanup;
    • useMedia - tracks state of a CSS media query;
    • useMouse - track position of mouse/touch on window;
    • usePrefersColor
    • usePrefersReducedMotion
    • useUrlSearchParams
    • useWindowSize - return window size (height and width) in pixels;
    • useWindowScroll - return window scroll position (left, top);
  • Storage
    • useCookie
    • useLocalStorage
    • useSessionStorage
  • Elements
    • useElementBounding
    • useElementEventListener - element attached event listener that unsubscribe on cleanup;
    • useElementScroll
    • useElementSize
    • useIntersectionObserver
    • useMutationObserver
  • Network
    • useNetworkState - tracks state of connection;
0.0.4-1

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago