vbs-use
v0.1.0-beta.2
Published
<p align="center"> <h1 align="center">VBS-Use(WIP)</h1> <p align="center">VBS Vue Composition Utilities for Vue 2 and 3(WIP)</p> </p>
Downloads
1
Readme
TODO LIST
Elements:
- useActiveElement: Reactive document.activeElement.
- useDraggable: Make elements draggable.
- useElementBounding: Reactive bounding box of an HTML element.
- useElementVisibility: Tracks the visibility of an element within the viewport.
- useMouseInElement: Reactive mouse position related to an element.
- useWindowScroll: Reactive window scroll.
Browser
- useBreakpoints: Reactive viewport breakpoints.
- useBrowserLocation: Reactive browser location.
- useClipboard: Reactive Clipboard API.
- useEventListener:Use EventListener with ease. Register using addEventListener on mounted, and removeEventListener automatically on unmounted.
- useFullscreen: Reactive Fullscreen API.
- useImage: Reactive load an image in the browser, you can wait the result to display it or show a fallback.
- useUrlSearchParams: Reactive URLSearchParams.
Behavior:
- onClickOutside: Listen for clicks outside of an element. Useful for modal or dropdown.
- useGeolocation: Reactive Geolocation API.
- useInfiniteScroll: Infinite scrolling of the element.
- useMouse: Reactive mouse position.
- useOnline: Reactive online state. A wrapper of useNetwork.
- useFetch: Reactive Fetch API provides the ability to abort requests, intercept requests before they are fired, automatically refetch requests when the url changes, and create your own useFetchwith predefined options.
- useNow: Reactive current Date instance.
- useIntervalFn: Wrapper for setInterval with controls.
- useRafFn: Call function on every requestAnimationFrame. With controls of pausing and resuming.
- useTimestamp: Reactive current timestamp.
Utils:
- useVModel: Shorthand for v-model binding, props + emit -> ref.
- useDateFormat: Get the formatted date according to the string of tokens passed in, inspired by dayjs.
- useTimeAgo: Reactive time ago.
- useSorted: Reactive sort array.
- useBase64: Reactive base64 transforming. Supports plain text, buffer, files, canvas, objects, maps, sets and images.
- useCounter: Basic counter with utility functions.
- useCycleList: Cycle through a list of items.
- useDebounceFn: Debounce execution of a function.
- useThrottleFn: Throttle execution of a function. Especially useful for rate limiting execution of handlers on events like resize and scroll.
- useToggle: A boolean switcher with utility functions.