https://github.com/yaxingson/beautiful-vue-use
A collection of beautiful vue composable utilities
https://github.com/yaxingson/beautiful-vue-use
composable typescript vue-composition-api vue-use vue3
Last synced: 8 months ago
JSON representation
A collection of beautiful vue composable utilities
- Host: GitHub
- URL: https://github.com/yaxingson/beautiful-vue-use
- Owner: yaxingson
- License: mit
- Created: 2024-05-05T11:58:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-16T14:07:07.000Z (about 1 year ago)
- Last Synced: 2025-04-13T04:42:51.271Z (8 months ago)
- Topics: composable, typescript, vue-composition-api, vue-use, vue3
- Language: Vue
- Homepage:
- Size: 4.46 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
## 🚀 Features
## 📦 Install
### Package manager
```shell
# npm
$ npm install beautiful-vue-use --save
$ npm install @beautiful-vue-use/animate --save
# pnpm
$ pnpm add beautiful-vue-use
$ pnpm add @beautiful-vue-use/animate --save
```
### CDN
```html
```
## 🔨 Usage
Manual import:
```js
import { useInterval, useCookie, useCounter } from 'beautiful-vue-use'
import { useInterval, useSpring } from '@beautiful-vue-use/animate'
```
Auto import:
```shell
$ npm i -D unplugin-auto-import
```
```ts
// vite.config.ts
import { defineConfig } from 'vite'
import AutoImport from 'unplugin-auto-import/vite'
export default defineConfig({
plugins:[
AutoImport({
include:[/\.vue$/],
imports:[
"beautiful-vue-use",
{
'@beautiful-vue-use/animate':[
'useInterval',
['useTimeout', 'useDelay']
]
},
{
from:'@beautiful-vue-use/effect',
imports:[''],
type:true
}
]
// ...
})
]
})
```
## 🦄 Functions
animate
effect
- useCookie
- useCopyToClipboard
- useError
- useFavicon
- useLocalStorage
- usePermission
- useSessionStorage
- useTitle
lifecycle
sensors
state
- useCounter
- useDefault
- useFirstMountState
- useList
- useMap
- useMethods
- useMultiStateValidator
- usePrevious
- useQueue
- useSet
- useToggle
ui
miscellaneous
## 📄 License
MIT License © 2024-PRESENT Yaxing Son