Skip to content

VueUseCollection of Vue Composition Utilities

Collection of Essential Vue Composition Utilities

Get Started

Learn VueUse with video
vue
const { 
x
,
y
} =
useMouse
()
<
div
>pos: {{
x
}}, {{
y
}}</
div
>
</template>

Usage Example

Simply importing the functions you need from @vueuse/core

vue
import { 
useLocalStorage
,
useMouse
,
usePreferredDark
// tracks mouse position const {
x
,
y
} =
useMouse
()
// is user prefers dark theme const
isDark
=
usePreferredDark
()
// persist state in localStorage const
store
=
useLocalStorage
(
name
color

Refer to functions list for more details.

Released under the MIT License.

Save 37% on one year of learning Vue, Includes the Vue.js Master Class.
Get Offer