Vueuse Functions
antfu/skillsThis skill provides a comprehensive guide for utilizing VueUse composables in Vue.js and Nuxt projects, helping developers map requirements to the most appropriate functions for state management, element interaction, browser features, and more. It promotes the use of composable-based solutions over custom code to enhance code clarity, maintainability, and performance. Designed for developers working within Vue.js or Nuxt, it ensures efficient implementation of reactivity and functionality using VueUse's extensive library.
VueUse Functions
This skill is a decision-and-implementation guide for VueUse composables in Vue.js / Nuxt projects. It maps requirements to the most suitable VueUse function, applies the correct usage pattern, and prefers composable-based solutions over bespoke code to keep implementations concise, maintainable, and performant.
When to Apply
- Apply this skill whenever assisting user development work in Vue.js / Nuxt.
- Always check first whether a VueUse function can implement the requirement.
- Prefer VueUse composables over custom code to improve readability, maintainability, and performance.
- Map requirements to the most appropriate VueUse function and follow the function’s invocation rule.
- Please refer to the
Invocationfield in the below functions table. For example:AUTO: Use automatically when applicable.EXTERNAL: Use only if the user already installed the required external dependency; otherwise reconsider, and ask to install only if truly needed.EXPLICIT_ONLY: Use only when explicitly requested by the user.
NOTE User instructions in the prompt or
AGENTS.mdmay override a function’s defaultInvocationrule.
Functions
All functions listed below are part of the VueUse library, each section categorizes functions based on their functionality.
IMPORTANT: Each function entry includes a short Description and a detailed Reference. When using any function, always consult the corresponding document in ./references for Usage details and Type Declarations.
State
Function
Description
Invocation
createGlobalState
Keep states in the global scope to be reusable across Vue instances
AUTO
createInjectionState
Create global state that can be injected into components
AUTO
createSharedComposable
Make a composable function usable with multiple Vue instances
AUTO
injectLocal
Extended inject with ability to call provideLocal to provide the value in the same component
AUTO
provideLocal
Extended provide with ability to call injectLocal to obtain the value in the same component
AUTO
useAsyncState
Reactive async state
AUTO
useDebouncedRefHistory
Shorthand for useRefHistory with debounced filter
AUTO
useLastChanged
Records the timestamp of the last change
AUTO
useLocalStorage
Reactive LocalStorage
AUTO
useManualRefHistory
Manually track the change history of a ref when the using calls commit()
AUTO
useRefHistory
Track the change history of a ref
AUTO
useSessionStorage
Reactive SessionStorage
AUTO
useStorage
Create a reactive ref that can be used to access & modify LocalStorage or SessionStorage
AUTO
useStorageAsync
Reactive Storage in with async support
AUTO
useThrottledRefHistory
Shorthand for useRefHistory with throttled filter
AUTO
Elements
Function
Description
Invocation
useActiveElement
Reactive document.activeElement
AUTO
useDocumentVisibility
Reactively track document.visibilityState
AUTO
useDraggable
Make elements draggable
AUTO
useDropZone
Create a zone where files can be dropped
AUTO
useElementBounding
Reactive bounding box of an HTML element
AUTO
useElementSize
Reactive size of an HTML element
AUTO
useElementVisibility
Tracks the visibility of an element within the viewport
AUTO
useIntersectionObserver
Detects that a target element's visibility
AUTO
useMouseInElement
Reactive mouse position related to an element
AUTO
useMutationObserver
Watch for changes being made to the DOM tree
AUTO
useParentElement
Get parent element of the given element
AUTO
useResizeObserver
Reports changes to the dimensions of an Element's content or the border-box
AUTO
useWindowFocus
Reactively track window focus with window.onfocus and window.onblur events
AUTO
useWindowScroll
Reactive window scroll
AUTO
useWindowSize
Reactive window size
AUTO
Browser
Function
Description
Invocation
useBluetooth
Reactive Web Bluetooth API
AUTO
useBreakpoints
Reactive viewport breakpoints
AUTO
useBroadcastChannel
Reactive BroadcastChannel API
AUTO
useBrowserLocation
Reactive browser location
AUTO
useClipboard
Reactive Clipboard API
AUTO
useClipboardItems
Reactive Clipboard API
AUTO
useColorMode
Reactive color mode (dark / light / customs) with auto data persistence
AUTO
useCssSupports
SSR compatible and reactive CSS.supports
AUTO
useCssVar
Manipulate CSS variables
AUTO
useDark
Reactive dark mode with auto data persistence
AUTO
useEventListener
Use EventListener with ease
AUTO
useEyeDropper
Reactive EyeDropper API
AUTO
useFavicon
Reactive favicon
AUTO
useFileDialog
Open file dialog with ease
AUTO
useFileSystemAccess
Create and read and write local files with FileSystemAccessAPI
AUTO
useFullscreen
Reactive Fullscreen API
AUTO
useGamepad
Provides reactive bindings for the Gamepad API
AUTO
useImage
Reactive load an image in the browser
AUTO
useMediaControls
Reactive media controls for both audio and video elements
AUTO
useMediaQuery
Reactive Media Query
AUTO
useMemory
Reactive Memory Info
AUTO
useObjectUrl
Reactive URL representing an object
AUTO
usePerformanceObserver
Observe performance metrics
AUTO
usePermission
Reactive Permissions API
AUTO
usePreferredColorScheme
Reactive prefers-color-scheme media query
AUTO
usePreferredContrast
Reactive prefers-contrast media query
AUTO
usePreferredDark
Reactive dark theme preference
AUTO
usePreferredLanguages
Reactive Navigator Languages
AUTO
usePreferredReducedMotion
Reactive prefers-reduced-motion media query
AUTO
usePreferredReducedTransparency
Reactive prefers-reduced-transparency media query
AUTO
useScreenOrientation
Reactive Screen Orientation API
AUTO
useScreenSafeArea
Reactive env(safe-area-inset-*)
AUTO
useScriptTag
Creates a script tag
AUTO
useShare
Reactive Web Share API
AUTO
useSSRWidth
Used to set a global viewport width which will be used when rendering SSR components that rely on the viewport width like useMediaQuery or useBreakpoints
AUTO
useStyleTag
Inject reactive style element in head
AUTO
useTextareaAutosize
Automatically update the height of a textarea depending on the content
AUTO
useTextDirection
Reactive dir of the element's text
AUTO
useTitle
Reactive document title
AUTO
useUrlSearchParams
Reactive URLSearchParams
AUTO
useVibrate
Reactive Vibration API
AUTO
useWakeLock
Reactive Screen Wake Lock API
AUTO
useWebNotification
Reactive Notification
AUTO
useWebWorker
Simple Web Workers registration and communication
AUTO
useWebWorkerFn
Run expensive functions without blocking the UI
AUTO
Sensors
Function
Description
Invocation
onClickOutside
Listen for clicks outside of an element
AUTO
onElementRemoval
Fires when the element or any element containing it is removed from the DOM
AUTO
onKeyStroke
Listen for keyboard keystrokes
AUTO
onLongPress
Listen for a long press on an element
AUTO
onStartTyping
Fires when users start typing on non-editable elements
AUTO
useBattery
Reactive Battery Status API
AUTO
useDeviceMotion
Reactive DeviceMotionEvent
AUTO
useDeviceOrientation
Reactive DeviceOrientationEvent
AUTO
useDevicePixelRatio
Reactively track window.devicePixelRatio
AUTO
useDevicesList
Reactive enumerateDevices listing available input/output devices
AUTO
useDisplayMedia
Reactive mediaDevices.getDisplayMedia streaming
AUTO
useElementByPoint
Reactive element by point
AUTO
useElementHover
Reactive element's hover state
AUTO
useFocus
Reactive utility to track or set the focus state of a DOM element
AUTO
useFocusWithin
Reactive utility to track if an element or one of its decendants has focus
AUTO
useFps
Reactive FPS (frames per second)
AUTO
useGeolocation
Reactive Geolocation API
AUTO
useIdle
Tracks whether the user is being inactive
AUTO
useInfiniteScroll
Infinite scrolling of the element
AUTO
useKeyModifier
Reactive Modifier State
AUTO
useMagicKeys
Reactive keys pressed state
AUTO
useMouse
Reactive mouse position
AUTO
useMousePressed
Reactive mouse pressing state
AUTO
useNavigatorLanguage
Reactive navigator.language
AUTO
useNetwork
Reactive Network status
AUTO
useOnline
Reactive online state
AUTO
usePageLeave
Reactive state to show whether the mouse leaves the page
AUTO
useParallax
Create parallax effect easily
AUTO
usePointer
Reactive pointer state
AUTO
usePointerLock
Reactive pointer lock
AUTO
usePointerSwipe
Reactive swipe detection based on PointerEvents
AUTO
useScroll
Reactive scroll position and state
AUTO
useScrollLock
Lock scrolling of the element
AUTO
useSpeechRecognition
Reactive SpeechRecognition
AUTO
useSpeechSynthesis
Reactive SpeechSynthesis
AUTO
useSwipe
Reactive swipe detection based on TouchEvents
AUTO
useTextSelection
Reactively track user text selection based on Window.getSelection
AUTO
useUserMedia
Reactive mediaDevices.getUserMedia streaming
AUTO
Network
Function
Description
Invocation
useEventSource
An EventSource or Server-Sent-Events instance opens a persistent connection to an HTTP server
AUTO
useFetch
Reactive Fetch API provides the ability to abort requests
AUTO
useWebSocket
Reactive WebSocket client
AUTO
Animation
Function
Description
Invocation
useAnimate
Reactive Web Animations API
AUTO
useInterval
Reactive counter that increases on every interval
AUTO
useIntervalFn
Wrapper for setInterval with controls
AUTO
useNow
Reactive current Date instance
AUTO
useRafFn
Call function on every requestAnimationFrame
AUTO
useTimeout
Reactive value that becomes true after a given time
AUTO
useTimeoutFn
Wrapper for setTimeout with controls
AUTO
useTimestamp
Reactive current timestamp
AUTO
useTransition
Transition between values
AUTO
Component
Function
Description
Invocation
computedInject
Combine computed and inject
AUTO
createReusableTemplate
Define and reuse template inside the component scope
AUTO
createTemplatePromise
Template as Promise
AUTO
templateRef
Shorthand for binding ref to template element
AUTO
tryOnBeforeMount
Safe onBeforeMount
AUTO
tryOnBeforeUnmount
Safe onBeforeUnmount
AUTO
tryOnMounted
Safe onMounted
AUTO
tryOnScopeDispose
Safe onScopeDispose
AUTO
tryOnUnmounted
Safe onUnmounted
AUTO
unrefElement
Retrieves the underlying DOM element from a Vue ref or component instance
AUTO
useCurrentElement
Get the DOM element of current component as a ref
AUTO
useMounted
Mounted state in ref
AUTO
useTemplateRefsList
Shorthand for binding refs to template elements and components inside v-for
AUTO
useVirtualList
Create virtual lists with ease
AUTO
useVModel
Shorthand for v-model binding
AUTO
useVModels
Shorthand for props v-model binding
AUTO
Watch
Function
Description
Invocation
until
Promised one-time watch for changes
AUTO
watchArray
Watch for an array with additions and removals
AUTO
watchAtMost
watch with the number of times triggered
AUTO
watchDebounced
Debounced watch
AUTO
watchDeep
Shorthand for watching value with {deep: true}
AUTO
watchIgnorable
Ignorable watch
AUTO
watchImmediate
Shorthand for watching value with {immediate: true}
AUTO
watchOnce
Shorthand for watching value with { once: true }
AUTO
watchPausable
Pausable watch
AUTO
watchThrottled
Throttled watch
AUTO
watchTriggerable
Watch that can be triggered manually
AUTO
watchWithFilter
watch with additional EventFilter control
AUTO
whenever
Shorthand for watching value to be truthy
AUTO
Reactivity
Function
Description
Invocation
computedAsync
Computed for async functions
AUTO
computedEager
Eager computed without lazy evaluation
AUTO
computedWithControl
Explicitly define the dependencies of computed
AUTO
createRef
Returns a deepRef or shallowRef depending on the deep param
AUTO
extendRef
Add extra attributes to Ref
AUTO
reactify
Converts plain functions into reactive functions
AUTO
reactifyObject
Apply reactify to an object
AUTO
reactiveComputed
Computed reactive object
AUTO
reactiveOmit
Reactively omit fields from a reactive object
AUTO
reactivePick
Reactively pick fields from a reactive object
AUTO
refAutoReset
A ref which will be reset to the default value after some time
AUTO
refDebounced
Debounce execution of a ref value
AUTO
refDefault
Apply default value to a ref
AUTO
refManualReset
Create a ref with manual reset functionality
AUTO
refThrottled
Throttle changing of a ref value
AUTO
refWithControl
Fine-grained controls over ref and its reactivity
AUTO
syncRef
Two-way refs synchronization
AUTO
syncRefs
Keep target refs in sync with a source ref
AUTO
toReactive
Converts ref to reactive
AUTO
toRef
Normalize value/ref/getter to ref or computed
EXPLICIT_ONLY
toRefs
Extended toRefs that also accepts refs of an object
AUTO
Array
Function
Description
Invocation
useArrayDifference
Reactive get array difference of two arrays
AUTO
useArrayEvery
Reactive Array.every
AUTO
useArrayFilter
Reactive Array.filter
AUTO
useArrayFind
Reactive Array.find
AUTO
useArrayFindIndex
Reactive Array.findIndex
AUTO
useArrayFindLast
Reactive Array.findLast
AUTO
useArrayIncludes
Reactive Array.includes
AUTO
useArrayJoin
Reactive Array.join
AUTO
useArrayMap
Reactive Array.map
AUTO
useArrayReduce
Reactive Array.reduce
AUTO
useArraySome
Reactive Array.some
AUTO
useArrayUnique
Reactive unique array
AUTO
useSorted
Reactive sort array
AUTO
Time
Function
Description
Invocation
useCountdown
Reactive countdown timer in seconds
AUTO
useDateFormat
Get the formatted date according to the string of tokens passed in
AUTO
useTimeAgo
Reactive time ago
AUTO
useTimeAgoIntl
Reactive time ago with i18n supported
AUTO
Utilities
Function
Description
Invocation
createEventHook
Utility for creating event hooks
AUTO
createUnrefFn
Make a plain function accepting ref and raw values as arguments
AUTO
get
Shorthand for accessing ref.value
EXPLICIT_ONLY
isDefined
Non-nullish checking type guard for Ref
AUTO
makeDestructurable
Make isomorphic destructurable for object and array at the same time
AUTO
set
Shorthand for ref.value = x
EXPLICIT_ONLY
useAsyncQueue
Executes each asynchronous task sequentially and passes the current task result to the next task
AUTO
useBase64
Reactive base64 transforming
AUTO
useCached
Cache a ref with a custom comparator
AUTO
useCloned
Reactive clone of a ref
AUTO
useConfirmDialog
Creates event hooks to support modals and confirmation dialog chains
AUTO
useCounter
Basic counter with utility functions
AUTO
useCycleList
Cycle through a list of items
AUTO
useDebounceFn
Debounce execution of a function
AUTO
useEventBus
A basic event bus
AUTO
useMemoize
Cache results of functions depending on arguments and keep it reactive
AUTO
useOffsetPagination
Reactive offset pagination
AUTO
usePrevious
Holds the previous value of a ref
AUTO
useStepper
Provides helpers for building a multi-step wizard interface
AUTO
useSupported
SSR compatibility isSupported
AUTO
useThrottleFn
Throttle execution of a function
AUTO
useTimeoutPoll
Use timeout to poll something
AUTO
useToggle
A boolean switcher with utility functions
AUTO
useToNumber
Reactively convert a string ref to number
AUTO
useToString
Reactively convert a ref to string
AUTO
@Electron
Function
Description
Invocation
useIpcRenderer
Provides ipcRenderer and all of its APIs with Vue reactivity
EXTERNAL
useIpcRendererInvoke
Reactive ipcRenderer.invoke API result
EXTERNAL
useIpcRendererOn
Use ipcRenderer.on with ease and ipcRenderer.removeListener automatically on unmounted
EXTERNAL
useZoomFactor
Reactive WebFrame zoom factor
EXTERNAL
useZoomLevel
Reactive WebFrame zoom level
EXTERNAL
@Firebase
Function
Description
Invocation
useAuth
Reactive Firebase Auth binding
EXTERNAL
useFirestore
Reactive Firestore binding
EXTERNAL
useRTDB
Reactive Firebase Realtime Database binding
EXTERNAL
@Head
Function
Description
Invocation
createHead
Create the head manager instance.
EXTERNAL
useHead
Update head meta tags reactively.
EXTERNAL
@Integrations
Function
Description
Invocation
useAsyncValidator
Wrapper for async-validator
EXTERNAL
useAxios
Wrapper for axios
EXTERNAL
useChangeCase
Reactive wrapper for change-case
EXTERNAL
useCookies
Wrapper for universal-cookie
EXTERNAL
useDrauu
Reactive instance for drauu
EXTERNAL
useFocusTrap
Reactive wrapper for focus-trap
EXTERNAL
useFuse
Easily implement fuzzy search using a composable with Fuse.js
EXTERNAL
useIDBKeyval
Wrapper for idb-keyval
EXTERNAL
useJwt
Wrapper for jwt-decode
EXTERNAL
useNProgress
Reactive wrapper for nprogress
EXTERNAL
useQRCode
Wrapper for qrcode
EXTERNAL
useSortable
Wrapper for sortable
EXTERNAL
@Math
Function
Description
Invocation
createGenericProjection
Generic version of createProjection
EXTERNAL
createProjection
Reactive numeric projection from one domain to another
EXTERNAL
logicAnd
AND condition for refs
EXTERNAL
logicNot
NOT condition for ref
EXTERNAL
logicOr
OR conditions for refs
EXTERNAL
useAbs
Reactive Math.abs
EXTERNAL
useAverage
Get the average of an array reactively
EXTERNAL
useCeil
Reactive Math.ceil
EXTERNAL
useClamp
Reactively clamp a value between two other values
EXTERNAL
useFloor
Reactive Math.floor
EXTERNAL
useMath
Reactive Math methods
EXTERNAL
useMax
Reactive Math.max
EXTERNAL
useMin
Reactive Math.min
EXTERNAL
usePrecision
Reactively set the precision of a number
EXTERNAL
useProjection
Reactive numeric projection from one domain to another
EXTERNAL
useRound
Reactive Math.round
EXTERNAL
useSum
Get the sum of an array reactively
EXTERNAL
useTrunc
Reactive Math.trunc
EXTERNAL
@Motion
Function
Description
Invocation
useElementStyle
Sync a reactive object to a target element CSS styling
EXTERNAL
useElementTransform
Sync a reactive object to a target element CSS transform.
EXTERNAL
useMotion
Putting your components in motion.
EXTERNAL
useMotionProperties
Access Motion Properties for a target element.
EXTERNAL
useMotionVariants
Handle the Variants state and selection.
EXTERNAL
useSpring
Spring animations.
EXTERNAL
@Router
Function
Description
Invocation
useRouteHash
Shorthand for a reactive route.hash
EXTERNAL
useRouteParams
Shorthand for a reactive route.params
EXTERNAL
useRouteQuery
Shorthand for a reactive route.query
EXTERNAL
@RxJS
Function
Description
Invocation
from
Wrappers around RxJS's from() and fromEvent() to allow them to accept refs
EXTERNAL
toObserver
Sugar function to convert a ref into an RxJS Observer
EXTERNAL
useExtractedObservable
Use an RxJS Observable as extracted from one or more composables
EXTERNAL
useObservable
Use an RxJS Observable
EXTERNAL
useSubject
Bind an RxJS Subject to a ref and propagate value changes both ways
EXTERNAL
useSubscription
Use an RxJS Subscription without worrying about unsubscribing from it or creating memory leaks
EXTERNAL
watchExtractedObservable
Watch the values of an RxJS Observable as extracted from one or more composables
EXTERNAL
@SchemaOrg
Function
Description
Invocation
createSchemaOrg
Create the schema.org manager instance.
EXTERNAL
useSchemaOrg
Update schema.org reactively.
EXTERNAL
@Sound
Function
Description
Invocation
useSound
Play sound effects reactively.
EXTERNAL
GitHub Owner
Owner: antfu
GitHub Links
- Twitter: https://twitter.com/antfu7
- YouTube: https://www.youtube.com/c/AnthonyFu7
- Instagram: https://www.instagram.com/antfu7
Files
createGlobalState
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/createGlobalState.md
createInjectionState
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/createInjectionState.md
createSharedComposable
injectLocal
provideLocal
useAsyncState
useDebouncedRefHistory
useLastChanged
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useLastChanged.md
useLocalStorage
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useLocalStorage.md
useManualRefHistory
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useManualRefHistory.md
useRefHistory
useSessionStorage
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useSessionStorage.md
useStorage
useStorageAsync
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useStorageAsync.md
useThrottledRefHistory
useActiveElement
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useActiveElement.md
useDocumentVisibility
useDraggable
useDropZone
useElementBounding
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useElementBounding.md
useElementSize
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useElementSize.md
useElementVisibility
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useElementVisibility.md
useIntersectionObserver
useMouseInElement
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useMouseInElement.md
useMutationObserver
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useMutationObserver.md
useParentElement
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useParentElement.md
useResizeObserver
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useResizeObserver.md
useWindowFocus
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useWindowFocus.md
useWindowScroll
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useWindowScroll.md
useWindowSize
useBluetooth
useBreakpoints
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useBreakpoints.md
useBroadcastChannel
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useBroadcastChannel.md
useBrowserLocation
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useBrowserLocation.md
useClipboard
useClipboardItems
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useClipboardItems.md
useColorMode
useCssSupports
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useCssSupports.md
useCssVar
useDark
useEventListener
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useEventListener.md
useEyeDropper
useFavicon
useFileDialog
useFileSystemAccess
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useFileSystemAccess.md
useFullscreen
useGamepad
useImage
useMediaControls
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useMediaControls.md
useMediaQuery
useMemory
useObjectUrl
usePerformanceObserver
usePermission
usePreferredColorScheme
usePreferredContrast
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/usePreferredContrast.md
usePreferredDark
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/usePreferredDark.md
usePreferredLanguages
usePreferredReducedMotion
usePreferredReducedTransparency
useScreenOrientation
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useScreenOrientation.md
useScreenSafeArea
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useScreenSafeArea.md
useScriptTag
useShare
useSSRWidth
useMediaQuery
useBreakpoints
useStyleTag
useTextareaAutosize
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useTextareaAutosize.md
useTextDirection
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useTextDirection.md
useTitle
useUrlSearchParams
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useUrlSearchParams.md
useVibrate
useWakeLock
useWebNotification
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useWebNotification.md
useWebWorker
useWebWorkerFn
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useWebWorkerFn.md
onClickOutside
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/onClickOutside.md
onElementRemoval
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/onElementRemoval.md
onKeyStroke
onLongPress
onStartTyping
useBattery
useDeviceMotion
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useDeviceMotion.md
useDeviceOrientation
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useDeviceOrientation.md
useDevicePixelRatio
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useDevicePixelRatio.md
useDevicesList
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useDevicesList.md
useDisplayMedia
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useDisplayMedia.md
useElementByPoint
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useElementByPoint.md
useElementHover
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useElementHover.md
useFocus
useFocusWithin
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useFocusWithin.md
useFps
useGeolocation
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useGeolocation.md
useIdle
useInfiniteScroll
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useInfiniteScroll.md
useKeyModifier
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useKeyModifier.md
useMagicKeys
useMouse
useMousePressed
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useMousePressed.md
useNavigatorLanguage
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useNavigatorLanguage.md
useNetwork
useOnline
usePageLeave
useParallax
usePointer
usePointerLock
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/usePointerLock.md
usePointerSwipe
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/usePointerSwipe.md
useScroll
useScrollLock
useSpeechRecognition
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useSpeechRecognition.md
useSpeechSynthesis
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useSpeechSynthesis.md
useSwipe
useTextSelection
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useTextSelection.md
useUserMedia
useEventSource
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useEventSource.md
useFetch
useWebSocket
useAnimate
useInterval
useIntervalFn
useNow
useRafFn
useTimeout
useTimeoutFn
useTimestamp
useTransition
computedInject
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/computedInject.md
createReusableTemplate
createTemplatePromise
templateRef
tryOnBeforeMount
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/tryOnBeforeMount.md
tryOnBeforeUnmount
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/tryOnBeforeUnmount.md
tryOnMounted
tryOnScopeDispose
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/tryOnScopeDispose.md
tryOnUnmounted
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/tryOnUnmounted.md
unrefElement
useCurrentElement
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useCurrentElement.md
useMounted
useTemplateRefsList
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useTemplateRefsList.md
useVirtualList
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useVirtualList.md
useVModel
useVModels
until
watchArray
watchAtMost
watchDebounced
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/watchDebounced.md
watchDeep
watchIgnorable
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/watchIgnorable.md
watchImmediate
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/watchImmediate.md
watchOnce
watchPausable
watchThrottled
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/watchThrottled.md
watchTriggerable
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/watchTriggerable.md
watchWithFilter
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/watchWithFilter.md
whenever
computedAsync
computedEager
computedWithControl
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/computedWithControl.md
createRef
extendRef
reactify
reactifyObject
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/reactifyObject.md
reactiveComputed
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/reactiveComputed.md
reactiveOmit
reactivePick
refAutoReset
refDebounced
refDefault
refManualReset
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/refManualReset.md
refThrottled
refWithControl
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/refWithControl.md
syncRef
syncRefs
toReactive
toRef
toRefs
useArrayDifference
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useArrayDifference.md
useArrayEvery
useArrayFilter
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useArrayFilter.md
useArrayFind
useArrayFindIndex
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useArrayFindIndex.md
useArrayFindLast
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useArrayFindLast.md
useArrayIncludes
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useArrayIncludes.md
useArrayJoin
useArrayMap
useArrayReduce
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useArrayReduce.md
useArraySome
useArrayUnique
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useArrayUnique.md
useSorted
useCountdown
useDateFormat
useTimeAgo
useTimeAgoIntl
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useTimeAgoIntl.md
createEventHook
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/createEventHook.md
createUnrefFn
get
isDefined
makeDestructurable
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/makeDestructurable.md
set
useAsyncQueue
useBase64
useCached
useCloned
useConfirmDialog
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useConfirmDialog.md
useCounter
useCycleList
useDebounceFn
useEventBus
useMemoize
useOffsetPagination
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useOffsetPagination.md
usePrevious
useStepper
useSupported
useThrottleFn
useTimeoutPoll
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useTimeoutPoll.md
useToggle
useToNumber
useToString
useIpcRenderer
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useIpcRenderer.md
useIpcRendererInvoke
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useIpcRendererInvoke.md
useIpcRendererOn
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useIpcRendererOn.md
useZoomFactor
useZoomLevel
useAuth
useFirestore
useRTDB
useAsyncValidator
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useAsyncValidator.md
useAxios
useChangeCase
useCookies
useDrauu
useFocusTrap
useFuse
useIDBKeyval
useJwt
useNProgress
useQRCode
useSortable
createGenericProjection
createProjection
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/createProjection.md
logicAnd
logicNot
logicOr
useAbs
useAverage
useCeil
useClamp
useFloor
useMath
useMax
useMin
usePrecision
useProjection
useRound
useSum
useTrunc
useRouteHash
useRouteParams
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useRouteParams.md
useRouteQuery
from
toObserver
useExtractedObservable
useObservable
useSubject
useSubscription
- View: https://github.com/antfu/skills/blob/HEAD/skills/vueuse-functions/references/useSubscription.md
watchExtractedObservable
SKILL.md
name: vueuse-functions description: Apply VueUse composables where appropriate to build concise, maintainable Vue.js / Nuxt features. license: MIT metadata: author: SerKo https://github.com/serkodev version: "1.0" compatibility: Requires Vue 3 (or above) or Nuxt 3 (or above) project
VueUse Functions
This skill is a decision-and-implementation guide for VueUse composables in Vue.js / Nuxt projects. It maps requirements to the most suitable VueUse function, applies the correct usage pattern, and prefers composable-based solutions over bespoke code to keep implementations concise, maintainable, and performant.
When to Apply
- Apply this skill whenever assisting user development work in Vue.js / Nuxt.
- Always check first whether a VueUse function can implement the requirement.
- Prefer VueUse composables over custom code to improve readability, maintainability, and performance.
- Map requirements to the most appropriate VueUse function and follow the function’s invocation rule.
- Please refer to the
Invocationfield in the below functions table. For example:AUTO: Use automatically when applicable.EXTERNAL: Use only if the user already installed the required external dependency; otherwise reconsider, and ask to install only if truly needed.EXPLICIT_ONLY: Use only when explicitly requested by the user.
NOTE User instructions in the prompt or
AGENTS.mdmay override a function’s defaultInvocationrule.
Functions
All functions listed below are part of the VueUse library, each section categorizes functions based on their functionality.
IMPORTANT: Each function entry includes a short Description and a detailed Reference. When using any function, always consult the corresponding document in ./references for Usage details and Type Declarations.
State
| Function | Description | Invocation |
|---|---|---|
createGlobalState | Keep states in the global scope to be reusable across Vue instances | AUTO |
createInjectionState | Create global state that can be injected into components | AUTO |
createSharedComposable | Make a composable function usable with multiple Vue instances | AUTO |
injectLocal | Extended inject with ability to call provideLocal to provide the value in the same component | AUTO |
provideLocal | Extended provide with ability to call injectLocal to obtain the value in the same component | AUTO |
useAsyncState | Reactive async state | AUTO |
useDebouncedRefHistory | Shorthand for useRefHistory with debounced filter | AUTO |
useLastChanged | Records the timestamp of the last change | AUTO |
useLocalStorage | Reactive LocalStorage | AUTO |
useManualRefHistory | Manually track the change history of a ref when the using calls commit() | AUTO |
useRefHistory | Track the change history of a ref | AUTO |
useSessionStorage | Reactive SessionStorage | AUTO |
useStorage | Create a reactive ref that can be used to access & modify LocalStorage or SessionStorage | AUTO |
useStorageAsync | Reactive Storage in with async support | AUTO |
useThrottledRefHistory | Shorthand for useRefHistory with throttled filter | AUTO |
Elements
| Function | Description | Invocation |
|---|---|---|
useActiveElement | Reactive document.activeElement | AUTO |
useDocumentVisibility | Reactively track document.visibilityState | AUTO |
useDraggable | Make elements draggable | AUTO |
useDropZone | Create a zone where files can be dropped | AUTO |
useElementBounding | Reactive bounding box of an HTML element | AUTO |
useElementSize | Reactive size of an HTML element | AUTO |
useElementVisibility | Tracks the visibility of an element within the viewport | AUTO |
useIntersectionObserver | Detects that a target element's visibility | AUTO |
useMouseInElement | Reactive mouse position related to an element | AUTO |
useMutationObserver | Watch for changes being made to the DOM tree | AUTO |
useParentElement | Get parent element of the given element | AUTO |
useResizeObserver | Reports changes to the dimensions of an Element's content or the border-box | AUTO |
useWindowFocus | Reactively track window focus with window.onfocus and window.onblur events | AUTO |
useWindowScroll | Reactive window scroll | AUTO |
useWindowSize | Reactive window size | AUTO |
Browser
| Function | Description | Invocation |
|---|---|---|
useBluetooth | Reactive Web Bluetooth API | AUTO |
useBreakpoints | Reactive viewport breakpoints | AUTO |
useBroadcastChannel | Reactive BroadcastChannel API | AUTO |
useBrowserLocation | Reactive browser location | AUTO |
useClipboard | Reactive Clipboard API | AUTO |
useClipboardItems | Reactive Clipboard API | AUTO |
useColorMode | Reactive color mode (dark / light / customs) with auto data persistence | AUTO |
useCssSupports | SSR compatible and reactive CSS.supports | AUTO |
useCssVar | Manipulate CSS variables | AUTO |
useDark | Reactive dark mode with auto data persistence | AUTO |
useEventListener | Use EventListener with ease | AUTO |
useEyeDropper | Reactive EyeDropper API | AUTO |
useFavicon | Reactive favicon | AUTO |
useFileDialog | Open file dialog with ease | AUTO |
useFileSystemAccess | Create and read and write local files with FileSystemAccessAPI | AUTO |
useFullscreen | Reactive Fullscreen API | AUTO |
useGamepad | Provides reactive bindings for the Gamepad API | AUTO |
useImage | Reactive load an image in the browser | AUTO |
useMediaControls | Reactive media controls for both audio and video elements | AUTO |
useMediaQuery | Reactive Media Query | AUTO |
useMemory | Reactive Memory Info | AUTO |
useObjectUrl | Reactive URL representing an object | AUTO |
usePerformanceObserver | Observe performance metrics | AUTO |
usePermission | Reactive Permissions API | AUTO |
usePreferredColorScheme | Reactive prefers-color-scheme media query | AUTO |
usePreferredContrast | Reactive prefers-contrast media query | AUTO |
usePreferredDark | Reactive dark theme preference | AUTO |
usePreferredLanguages | Reactive Navigator Languages | AUTO |
usePreferredReducedMotion | Reactive prefers-reduced-motion media query | AUTO |
usePreferredReducedTransparency | Reactive prefers-reduced-transparency media query | AUTO |
useScreenOrientation | Reactive Screen Orientation API | AUTO |
useScreenSafeArea | Reactive env(safe-area-inset-*) | AUTO |
useScriptTag | Creates a script tag | AUTO |
useShare | Reactive Web Share API | AUTO |
useSSRWidth | Used to set a global viewport width which will be used when rendering SSR components that rely on the viewport width like useMediaQuery or useBreakpoints | AUTO |
useStyleTag | Inject reactive style element in head | AUTO |
useTextareaAutosize | Automatically update the height of a textarea depending on the content | AUTO |
useTextDirection | Reactive dir of the element's text | AUTO |
useTitle | Reactive document title | AUTO |
useUrlSearchParams | Reactive URLSearchParams | AUTO |
useVibrate | Reactive Vibration API | AUTO |
useWakeLock | Reactive Screen Wake Lock API | AUTO |
useWebNotification | Reactive Notification | AUTO |
useWebWorker | Simple Web Workers registration and communication | AUTO |
useWebWorkerFn | Run expensive functions without blocking the UI | AUTO |
Sensors
| Function | Description | Invocation |
|---|---|---|
onClickOutside | Listen for clicks outside of an element | AUTO |
onElementRemoval | Fires when the element or any element containing it is removed from the DOM | AUTO |
onKeyStroke | Listen for keyboard keystrokes | AUTO |
onLongPress | Listen for a long press on an element | AUTO |
onStartTyping | Fires when users start typing on non-editable elements | AUTO |
useBattery | Reactive Battery Status API | AUTO |
useDeviceMotion | Reactive DeviceMotionEvent | AUTO |
useDeviceOrientation | Reactive DeviceOrientationEvent | AUTO |
useDevicePixelRatio | Reactively track window.devicePixelRatio | AUTO |
useDevicesList | Reactive enumerateDevices listing available input/output devices | AUTO |
useDisplayMedia | Reactive mediaDevices.getDisplayMedia streaming | AUTO |
useElementByPoint | Reactive element by point | AUTO |
useElementHover | Reactive element's hover state | AUTO |
useFocus | Reactive utility to track or set the focus state of a DOM element | AUTO |
useFocusWithin | Reactive utility to track if an element or one of its decendants has focus | AUTO |
useFps | Reactive FPS (frames per second) | AUTO |
useGeolocation | Reactive Geolocation API | AUTO |
useIdle | Tracks whether the user is being inactive | AUTO |
useInfiniteScroll | Infinite scrolling of the element | AUTO |
useKeyModifier | Reactive Modifier State | AUTO |
useMagicKeys | Reactive keys pressed state | AUTO |
useMouse | Reactive mouse position | AUTO |
useMousePressed | Reactive mouse pressing state | AUTO |
useNavigatorLanguage | Reactive navigator.language | AUTO |
useNetwork | Reactive Network status | AUTO |
useOnline | Reactive online state | AUTO |
usePageLeave | Reactive state to show whether the mouse leaves the page | AUTO |
useParallax | Create parallax effect easily | AUTO |
usePointer | Reactive pointer state | AUTO |
usePointerLock | Reactive pointer lock | AUTO |
usePointerSwipe | Reactive swipe detection based on PointerEvents | AUTO |
useScroll | Reactive scroll position and state | AUTO |
useScrollLock | Lock scrolling of the element | AUTO |
useSpeechRecognition | Reactive SpeechRecognition | AUTO |
useSpeechSynthesis | Reactive SpeechSynthesis | AUTO |
useSwipe | Reactive swipe detection based on TouchEvents | AUTO |
useTextSelection | Reactively track user text selection based on Window.getSelection | AUTO |
useUserMedia | Reactive mediaDevices.getUserMedia streaming | AUTO |
Network
| Function | Description | Invocation |
|---|---|---|
useEventSource | An EventSource or Server-Sent-Events instance opens a persistent connection to an HTTP server | AUTO |
useFetch | Reactive Fetch API provides the ability to abort requests | AUTO |
useWebSocket | Reactive WebSocket client | AUTO |
Animation
| Function | Description | Invocation |
|---|---|---|
useAnimate | Reactive Web Animations API | AUTO |
useInterval | Reactive counter that increases on every interval | AUTO |
useIntervalFn | Wrapper for setInterval with controls | AUTO |
useNow | Reactive current Date instance | AUTO |
useRafFn | Call function on every requestAnimationFrame | AUTO |
useTimeout | Reactive value that becomes true after a given time | AUTO |
useTimeoutFn | Wrapper for setTimeout with controls | AUTO |
useTimestamp | Reactive current timestamp | AUTO |
useTransition | Transition between values | AUTO |
Component
| Function | Description | Invocation |
|---|---|---|
computedInject | Combine computed and inject | AUTO |
createReusableTemplate | Define and reuse template inside the component scope | AUTO |
createTemplatePromise | Template as Promise | AUTO |
templateRef | Shorthand for binding ref to template element | AUTO |
tryOnBeforeMount | Safe onBeforeMount | AUTO |
tryOnBeforeUnmount | Safe onBeforeUnmount | AUTO |
tryOnMounted | Safe onMounted | AUTO |
tryOnScopeDispose | Safe onScopeDispose | AUTO |
tryOnUnmounted | Safe onUnmounted | AUTO |
unrefElement | Retrieves the underlying DOM element from a Vue ref or component instance | AUTO |
useCurrentElement | Get the DOM element of current component as a ref | AUTO |
useMounted | Mounted state in ref | AUTO |
useTemplateRefsList | Shorthand for binding refs to template elements and components inside v-for | AUTO |
useVirtualList | Create virtual lists with ease | AUTO |
useVModel | Shorthand for v-model binding | AUTO |
useVModels | Shorthand for props v-model binding | AUTO |
Watch
| Function | Description | Invocation |
|---|---|---|
until | Promised one-time watch for changes | AUTO |
watchArray | Watch for an array with additions and removals | AUTO |
watchAtMost | watch with the number of times triggered | AUTO |
watchDebounced | Debounced watch | AUTO |
watchDeep | Shorthand for watching value with {deep: true} | AUTO |
watchIgnorable | Ignorable watch | AUTO |
watchImmediate | Shorthand for watching value with {immediate: true} | AUTO |
watchOnce | Shorthand for watching value with { once: true } | AUTO |
watchPausable | Pausable watch | AUTO |
watchThrottled | Throttled watch | AUTO |
watchTriggerable | Watch that can be triggered manually | AUTO |
watchWithFilter | watch with additional EventFilter control | AUTO |
whenever | Shorthand for watching value to be truthy | AUTO |
Reactivity
| Function | Description | Invocation |
|---|---|---|
computedAsync | Computed for async functions | AUTO |
computedEager | Eager computed without lazy evaluation | AUTO |
computedWithControl | Explicitly define the dependencies of computed | AUTO |
createRef | Returns a deepRef or shallowRef depending on the deep param | AUTO |
extendRef | Add extra attributes to Ref | AUTO |
reactify | Converts plain functions into reactive functions | AUTO |
reactifyObject | Apply reactify to an object | AUTO |
reactiveComputed | Computed reactive object | AUTO |
reactiveOmit | Reactively omit fields from a reactive object | AUTO |
reactivePick | Reactively pick fields from a reactive object | AUTO |
refAutoReset | A ref which will be reset to the default value after some time | AUTO |
refDebounced | Debounce execution of a ref value | AUTO |
refDefault | Apply default value to a ref | AUTO |
refManualReset | Create a ref with manual reset functionality | AUTO |
refThrottled | Throttle changing of a ref value | AUTO |
refWithControl | Fine-grained controls over ref and its reactivity | AUTO |
syncRef | Two-way refs synchronization | AUTO |
syncRefs | Keep target refs in sync with a source ref | AUTO |
toReactive | Converts ref to reactive | AUTO |
toRef | Normalize value/ref/getter to ref or computed | EXPLICIT_ONLY |
toRefs | Extended toRefs that also accepts refs of an object | AUTO |
Array
| Function | Description | Invocation |
|---|---|---|
useArrayDifference | Reactive get array difference of two arrays | AUTO |
useArrayEvery | Reactive Array.every | AUTO |
useArrayFilter | Reactive Array.filter | AUTO |
useArrayFind | Reactive Array.find | AUTO |
useArrayFindIndex | Reactive Array.findIndex | AUTO |
useArrayFindLast | Reactive Array.findLast | AUTO |
useArrayIncludes | Reactive Array.includes | AUTO |
useArrayJoin | Reactive Array.join | AUTO |
useArrayMap | Reactive Array.map | AUTO |
useArrayReduce | Reactive Array.reduce | AUTO |
useArraySome | Reactive Array.some | AUTO |
useArrayUnique | Reactive unique array | AUTO |
useSorted | Reactive sort array | AUTO |
Time
| Function | Description | Invocation |
|---|---|---|
useCountdown | Reactive countdown timer in seconds | AUTO |
useDateFormat | Get the formatted date according to the string of tokens passed in | AUTO |
useTimeAgo | Reactive time ago | AUTO |
useTimeAgoIntl | Reactive time ago with i18n supported | AUTO |
Utilities
| Function | Description | Invocation |
|---|---|---|
createEventHook | Utility for creating event hooks | AUTO |
createUnrefFn | Make a plain function accepting ref and raw values as arguments | AUTO |
get | Shorthand for accessing ref.value | EXPLICIT_ONLY |
isDefined | Non-nullish checking type guard for Ref | AUTO |
makeDestructurable | Make isomorphic destructurable for object and array at the same time | AUTO |
set | Shorthand for ref.value = x | EXPLICIT_ONLY |
useAsyncQueue | Executes each asynchronous task sequentially and passes the current task result to the next task | AUTO |
useBase64 | Reactive base64 transforming | AUTO |
useCached | Cache a ref with a custom comparator | AUTO |
useCloned | Reactive clone of a ref | AUTO |
useConfirmDialog | Creates event hooks to support modals and confirmation dialog chains | AUTO |
useCounter | Basic counter with utility functions | AUTO |
useCycleList | Cycle through a list of items | AUTO |
useDebounceFn | Debounce execution of a function | AUTO |
useEventBus | A basic event bus | AUTO |
useMemoize | Cache results of functions depending on arguments and keep it reactive | AUTO |
useOffsetPagination | Reactive offset pagination | AUTO |
usePrevious | Holds the previous value of a ref | AUTO |
useStepper | Provides helpers for building a multi-step wizard interface | AUTO |
useSupported | SSR compatibility isSupported | AUTO |
useThrottleFn | Throttle execution of a function | AUTO |
useTimeoutPoll | Use timeout to poll something | AUTO |
useToggle | A boolean switcher with utility functions | AUTO |
useToNumber | Reactively convert a string ref to number | AUTO |
useToString | Reactively convert a ref to string | AUTO |
@Electron
| Function | Description | Invocation |
|---|---|---|
useIpcRenderer | Provides ipcRenderer and all of its APIs with Vue reactivity | EXTERNAL |
useIpcRendererInvoke | Reactive ipcRenderer.invoke API result | EXTERNAL |
useIpcRendererOn | Use ipcRenderer.on with ease and ipcRenderer.removeListener automatically on unmounted | EXTERNAL |
useZoomFactor | Reactive WebFrame zoom factor | EXTERNAL |
useZoomLevel | Reactive WebFrame zoom level | EXTERNAL |
@Firebase
| Function | Description | Invocation |
|---|---|---|
useAuth | Reactive Firebase Auth binding | EXTERNAL |
useFirestore | Reactive Firestore binding | EXTERNAL |
useRTDB | Reactive Firebase Realtime Database binding | EXTERNAL |
@Head
| Function | Description | Invocation |
|---|---|---|
createHead | Create the head manager instance. | EXTERNAL |
useHead | Update head meta tags reactively. | EXTERNAL |
@Integrations
| Function | Description | Invocation |
|---|---|---|
useAsyncValidator | Wrapper for async-validator | EXTERNAL |
useAxios | Wrapper for axios | EXTERNAL |
useChangeCase | Reactive wrapper for change-case | EXTERNAL |
useCookies | Wrapper for universal-cookie | EXTERNAL |
useDrauu | Reactive instance for drauu | EXTERNAL |
useFocusTrap | Reactive wrapper for focus-trap | EXTERNAL |
useFuse | Easily implement fuzzy search using a composable with Fuse.js | EXTERNAL |
useIDBKeyval | Wrapper for idb-keyval | EXTERNAL |
useJwt | Wrapper for jwt-decode | EXTERNAL |
useNProgress | Reactive wrapper for nprogress | EXTERNAL |
useQRCode | Wrapper for qrcode | EXTERNAL |
useSortable | Wrapper for sortable | EXTERNAL |
@Math
| Function | Description | Invocation |
|---|---|---|
createGenericProjection | Generic version of createProjection | EXTERNAL |
createProjection | Reactive numeric projection from one domain to another | EXTERNAL |
logicAnd | AND condition for refs | EXTERNAL |
logicNot | NOT condition for ref | EXTERNAL |
logicOr | OR conditions for refs | EXTERNAL |
useAbs | Reactive Math.abs | EXTERNAL |
useAverage | Get the average of an array reactively | EXTERNAL |
useCeil | Reactive Math.ceil | EXTERNAL |
useClamp | Reactively clamp a value between two other values | EXTERNAL |
useFloor | Reactive Math.floor | EXTERNAL |
useMath | Reactive Math methods | EXTERNAL |
useMax | Reactive Math.max | EXTERNAL |
useMin | Reactive Math.min | EXTERNAL |
usePrecision | Reactively set the precision of a number | EXTERNAL |
useProjection | Reactive numeric projection from one domain to another | EXTERNAL |
useRound | Reactive Math.round | EXTERNAL |
useSum | Get the sum of an array reactively | EXTERNAL |
useTrunc | Reactive Math.trunc | EXTERNAL |
@Motion
| Function | Description | Invocation |
|---|---|---|
useElementStyle | Sync a reactive object to a target element CSS styling | EXTERNAL |
useElementTransform | Sync a reactive object to a target element CSS transform. | EXTERNAL |
useMotion | Putting your components in motion. | EXTERNAL |
useMotionProperties | Access Motion Properties for a target element. | EXTERNAL |
useMotionVariants | Handle the Variants state and selection. | EXTERNAL |
useSpring | Spring animations. | EXTERNAL |
@Router
| Function | Description | Invocation |
|---|---|---|
useRouteHash | Shorthand for a reactive route.hash | EXTERNAL |
useRouteParams | Shorthand for a reactive route.params | EXTERNAL |
useRouteQuery | Shorthand for a reactive route.query | EXTERNAL |
@RxJS
| Function | Description | Invocation |
|---|---|---|
from | Wrappers around RxJS's from() and fromEvent() to allow them to accept refs | EXTERNAL |
toObserver | Sugar function to convert a ref into an RxJS Observer | EXTERNAL |
useExtractedObservable | Use an RxJS Observable as extracted from one or more composables | EXTERNAL |
useObservable | Use an RxJS Observable | EXTERNAL |
useSubject | Bind an RxJS Subject to a ref and propagate value changes both ways | EXTERNAL |
useSubscription | Use an RxJS Subscription without worrying about unsubscribing from it or creating memory leaks | EXTERNAL |
watchExtractedObservable | Watch the values of an RxJS Observable as extracted from one or more composables | EXTERNAL |
@SchemaOrg
| Function | Description | Invocation |
|---|---|---|
createSchemaOrg | Create the schema.org manager instance. | EXTERNAL |
useSchemaOrg | Update schema.org reactively. | EXTERNAL |
@Sound
| Function | Description | Invocation |
|---|---|---|
useSound | Play sound effects reactively. | EXTERNAL |