Skip to content

VueUse

A large set of ready-made Vue 3 composable functions for common UI and browser tasks.

Stars
22.4k
Forks
3k
Licence
MIT
Language
TypeScript
Last update
6 days ago
Type
Library

What it is

VueUse is a collection of reusable functions (called composables) for Vue 3, such as tracking mouse position, detecting a user's dark-mode preference, or saving state to localStorage. Developers import the functions they need instead of writing that logic from scratch. The README says it is tree-shakeable, works with SSR, and can be loaded from a CDN without a bundler.

  • Track mouse coordinates with useMouse
  • Detect the user's preferred dark theme with usePreferredDark
  • Persist component state in localStorage with useLocalStorage
  • Use the library via a CDN script tag without a build step

Great for

  • Vue 3 developers who repeat common browser logic across projects
  • Teams building Vue apps with Vite, Nuxt, or Webpack
  • Developers who want typed, documented utilities
  • Projects that need server-side rendering support

Not ideal for

  • Projects still on Vue 2, since v12 and later dropped Vue 2 support (use v11.x instead)
  • Projects on Vue older than 3.5 if they use v14 or later, since the README says v14 requires Vue 3.5+
  • Non-developers looking for a finished app, because this is a code library
Step-by-step guide: how to use VueUseInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js · Vue 3.5+ (for v14 and later)

    Install the core package

    npm i @vueuse/core
  2. 2

    Run it

    • Install the package with npm i @vueuse/core
    • Import a function such as useMouse from '@vueuse/core' into a Vue component
    • Call the function inside setup and use its returned refs in your template
    • Check the functions list at vueuse.org for the full set
  3. 3

    Get the most out of it

    • Browse the functions list at vueuse.org/functions to find existing utilities before writing your own
    • Use the optional Add-ons (Router, Firebase, RxJS, etc.) listed on the docs site when relevant
    • Check bundle sizes on the export-size page to keep your build small
    • Use the Nuxt Module if you build with Nuxt

Downloads

Strengths

  • Covers many common needs in one package
  • Written in TypeScript with documentation comments
  • Tree-shakeable, so unused functions are not bundled

Trade-offs

  • Only as good as the functions you use; some add-ons depend on other libraries such as Firebase or RxJS
  • Requires familiarity with Vue's Composition API to use effectively

How it compares

ProjectStarsTypeLevelUpdatedBest for
vueuse (this)22.4kLibrarybeginner6 days agoVue 3 developers who repeat common browser logic across projects
soybean-admin15.2kLibraryintermediate16 days agoDevelopers starting a new internal admin or back-office web app with Vue 3
formily12.6kLibraryintermediate1.4 years agoFrontend developers building data-heavy forms with many linked fields
vant24.4kLibrarybeginner4 days agoTeams building mobile-first web apps or H5 pages in Vue
vue-admin-better18.9kAppintermediate17 days agoFront-end developers with about a year of experience who want an admin panel starting point
slidev49.3kDev toolbeginner14 days agoDevelopers who want to present code, technical talks, or architecture diagrams

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.