- Notifications
You must be signed in to change notification settings - Fork41
🕸 Web APIs implemented as Vue.js composition functions
License
Tarektouati/vue-use-web
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Web APIs implemented as Vue.js composition functions.
This is a collection ofWeb APIs exposed as Vue.js composition hooks that's upcoming in Vue 3.0
You can use them with Vue 2.0 using@vue/composition-api until Vue 3.0 gets out.
Web APIs are ever changing, this library aims to provide to Vue.js developers a stable interface that integrates well into the ecosystem. Also an interface that degrades gracefully when browsers do not support said features.
I initially was choosing to expose this as aStateful functional components but that isn't very handy and is not future proof. Implementing these APIs in Vue composition API (hooks) makes them ready for Vue 3.0 and beyond. Personally I think this is the perfect example to showcase the power of the Composition API.
# install with yarnyarn add @vue/composition-api vue-use-web# install with npmnpm install @vue/composition-api vue-use-web
Kindly Check the documentation for examples.
Each composition function is designed to degrade gracefully so you can safely use them, but you should use these as a progressive enhancements for your apps. Check browsers compatibilities for each API.
- Battery Status API.
- Clipboard API.
- Device Light.
- Device Motion.
- Device Orientation.
- Event Listener.
- Fetch API.
- Full-screen.
- Geo-location API.
- Hardware Concurrency
- Intersection Observer.
- Localstorage API
- Media Query
- Mouse Position
- Network Information API.
- Preferred Color Scheme.
- Preferred Languages.
- Script.
- WebSocket.
- Window Scroll Position.
- Window Size.
- Worker.
- Notification.
- Media Devices.
- Bluetooth (TODO).
- Share (TODO).
- ResizeObserver (WIP)
This library is inspired bythe-platform andstandard-hooks for React.js.
MIT
About
🕸 Web APIs implemented as Vue.js composition functions
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.