# vueuse **Repository Path**: hewangjs/vueuse ## Basic Information - **Project Name**: vueuse - **Description**: vueuse源码学习 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-29 - **Last Updated**: 2025-09-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

VueUse - Collection of essential Vue Composition Utilities VueUse - Collection of essential Vue Composition Utilities
Collection of essential Vue Composition Utilities

NPM version NPM Downloads Codecov Docs & Demos Function Count
GitHub stars

## πŸš€ Features - πŸŽͺ [**Interactive docs & demos**](https://vueuse.org) - ⚑ **Fully tree shakeable**: Only take what you want, [bundle size](https://vueuse.org/export-size) - 🦾 **Type Strong**: Written in [TypeScript](https://www.typescriptlang.org/), with [TS Docs](https://github.com/microsoft/tsdoc) - πŸ”‹ **SSR Friendly** - 🌎 **No bundler required**: Usable via CDN - πŸ”© **Flexible**: Configurable event filters and targets - πŸ”Œ **Optional [Add-ons](https://vueuse.org/add-ons)**: Router, Firebase, RxJS, etc. ## πŸ¦„ Usage ```ts import { useLocalStorage, useMouse, usePreferredDark } from '@vueuse/core' const { x, y } = useMouse() // if user prefers dark theme const isDark = usePreferredDark() // persist state in localStorage const store = useLocalStorage( 'my-storage', { name: 'Apple', color: 'red', }, ) ``` Refer to [functions list](https://vueuse.org/functions) or [documentations](https://vueuse.org/) for more details. ## πŸ“¦ Install > From v14.0, VueUse requires Vue v3.5+ > From v13.0, VueUse requires Vue v3.3+ > From v12.0, VueUse no longer supports Vue 2. Please use v11.x for Vue 2 support. ```bash npm i @vueuse/core ``` [Add ons](https://vueuse.org/add-ons.html) | [Nuxt Module](https://vueuse.org/guide/index.html#nuxt) ###### Demos - [Vite + Vue 3](https://github.com/vueuse/vueuse-vite-starter) - [Nuxt 3 + Vue 3](https://github.com/antfu/vitesse-nuxt3) - [Webpack + Vue 3](https://github.com/vueuse/vueuse-vue3-example) ### CDN ```vue ``` It will be exposed to global as `window.VueUse` ## πŸͺ΄ Project Activity ![Alt](https://repobeats.axiom.co/api/embed/a406ba7461a6a087dbdb14d4395046c948d44c51.svg 'Repobeats analytics image') ## 🧱 Contribute See the [**Contributing Guide**](https://vueuse.org/contributing) ## 🌸 Thanks This project is heavily inspired by the following awesome projects. - [streamich/react-use](https://github.com/streamich/react-use) - [u3u/vue-hooks](https://github.com/u3u/vue-hooks) - [logaretm/vue-use-web](https://github.com/logaretm/vue-use-web) - [kripod/react-hooks](https://github.com/kripod/react-hooks) And thanks to [all the contributors on GitHub](https://github.com/vueuse/vueuse/graphs/contributors)! ## πŸ‘¨β€πŸš€ Contributors ### Financial Contributors on Open Collective ## πŸ“„ License [MIT License](https://github.com/vueuse/vueuse/blob/main/LICENSE) Β© 2019-PRESENT [Anthony Fu](https://github.com/antfu)