Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

@vueuse/core

Package Overview
Dependencies
4
Maintainers
3
Versions
305
Issues
File Explorer

Advanced tools

@vueuse/core

Collection of essential Vue Composition Utilities

    9.1.0latest

Version published
Maintainers
3
Weekly downloads
248,029
increased by1.58%

Weekly downloads

Changelog

Source

v9.1.0

   🚀 Features

  • useCycleList: Support MaybeRef for initialValue  -  by @Waleed-KH in https://github.com/vueuse/vueuse/issues/2025
  • usePrecision: New function  -  by @antfu <samp>(49c8a)</samp>
  • usePreferredReducedMotion: New function  -  by @Zhaocl1997 in https://github.com/vueuse/vueuse/issues/2039
  • useToNumber: New function  -  by @antfu <samp>(f69a3)</samp>
  • useToString: New function  -  by @antfu <samp>(2b869)</samp>

   🐞 Bug Fixes

  • Improve MaybeComputedRef  -  by @antfu <samp>(28c5a)</samp>
  • useFavicon: Writable return type  -  by @chaii3 and @antfu in https://github.com/vueuse/vueuse/issues/2036
  • useOffsetPagination: Min value for pageCount should be 1  -  by @jd-solanki and @antfu in https://github.com/vueuse/vueuse/issues/2001
  • useScriptTag: Normalize src arg  -  by @huynl-96 in https://github.com/vueuse/vueuse/issues/2030
  • useToFixed: Deprecated in favor of usePrecision  -  by @antfu <samp>(790ef)</samp>
  • useTransition: Improve type of TransitionPresets  -  by @antfu <samp>(cc865)</samp>
    View changes on GitHub

Readme

Source

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

NPM version NPM Downloads Docs & Demos Function Count
GitHub stars

🚀 Features

  • 🎪 Interactive docs & demos
  • 🕶 Seamless migration: Works for both Vue 3 and 2
  • 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' export default { setup() { // tracks mouse position const { x, y } = useMouse() // is user prefers dark theme const isDark = usePreferredDark() // persist state in localStorage const store = useLocalStorage( 'my-storage', { name: 'Apple', color: 'red', }, ) return { x, y, isDark, store } }, }

Refer to functions list or documentations for more details.

📦 Install

🎩 From v4.0, it works for Vue 2 & 3 within a single package by the power of vue-demi!

npm i @vueuse/core

Add ons | Nuxt Module

From v6.0, VueUse requires vue >= v3.2 or @vue/composition-api >= v1.1

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

Keywords

FAQs

What is @vueuse/core?

Collection of essential Vue Composition Utilities

Is @vueuse/core popular?

The npm package @vueuse/core receives a total of 203,252 weekly downloads. As such, @vueuse/core popularity was classified as popular.

Is @vueuse/core well maintained?

We found that @vueuse/core demonstrated a healthy version release cadence and project activity. It has 3 open source maintainers collaborating on the project.

Last updated on 04 Aug 2022
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc