vueuse

    vueuse/vueuse

    #946 this week

    Collection of essential Vue Composition Utilities for Vue 3

    frontend
    composable
    utility-library
    vue
    vue3
    vueuse
    TypeScript
    MIT
    22.4K stars
    2.9K forks
    22.4K GitHub watchers
    Updated 10/5/2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Use Cases & Benefits

    • Provides a collection of essential Vue 3 Composition Utilities written in TypeScript for reactive and reusable logic.
    • Offers fully tree-shakeable, type-strong utilities that are SSR friendly and usable without a bundler via CDN.
    • Use for enhancing Vue 3 applications with reactive state management and browser APIs like localStorage and mouse tracking.
    • Use for building type-safe, configurable composables that integrate with add-ons like Router, Firebase, and RxJS.
    • Use for rapid prototyping or production apps requiring flexible, modular utilities with interactive docs and demos.

    About vueuse

    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
    • ⚡ Fully tree shakeable: Only take what you want, bundle size
    • 🦾 Type Strong: Written in TypeScript, with TS Docs
    • 🔋 SSR Friendly
    • 🌎 No bundler required: Usable via CDN
    • 🔩 Flexible: Configurable event filters and targets
    • 🔌 Optional Add-ons: Router, Firebase, RxJS, etc.

    🦄 Usage

    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 or documentations 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.

    npm i @vueuse/core
    

    Add ons | Nuxt Module

    Demos

    CDN

    <script src="https://unpkg.com/@vueuse/shared"></script>
    
    <script src="https://unpkg.com/@vueuse/core"></script>
    

    It will be exposed to global as window.VueUse

    🪴 Project Activity

    Alt

    🧱 Contribute

    See the Contributing Guide

    🌸 Thanks

    This project is heavily inspired by the following awesome projects.

    And thanks to all the contributors on GitHub!

    👨‍🚀 Contributors

    Financial Contributors on Open Collective

    📄 License

    MIT License © 2019-PRESENT Anthony Fu

    Discover Repositories

    Search across tracked repositories by name or description