Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP #1

Open
1 of 33 tasks
yzh990918 opened this issue Nov 28, 2022 · 0 comments
Open
1 of 33 tasks

WIP #1

yzh990918 opened this issue Nov 28, 2022 · 0 comments
Assignees

Comments

@yzh990918
Copy link
Member

Elements:

  • useEventListener:Use EventListener with ease. Register using addEventListener on mounted, and removeEventListener automatically on unmounted.
  • 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.
  • 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.
@yzh990918 yzh990918 self-assigned this Nov 28, 2022
@yzh990918 yzh990918 pinned this issue Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant