Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajerez/vue-mobile-detection
Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile
https://github.com/ajerez/vue-mobile-detection
ismobile mobile-detect mobile-detection vue vuejs
Last synced: 2 months ago
JSON representation
Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile
- Host: GitHub
- URL: https://github.com/ajerez/vue-mobile-detection
- Owner: ajerez
- License: mit
- Created: 2019-03-25T11:42:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-29T10:21:11.000Z (over 2 years ago)
- Last Synced: 2024-03-24T04:41:50.615Z (3 months ago)
- Topics: ismobile, mobile-detect, mobile-detection, vue, vuejs
- Language: JavaScript
- Size: 575 KB
- Stars: 67
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile. (Components & Libraries / UI Components)
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile. (Components & Libraries / UI Components)
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile. (Components & Libraries / UI Components)
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile. (Components & Libraries / UI Components)
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile. (Components & Libraries / UI Components)
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile. (Components & Libraries / UI Components)
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile. (Components & Libraries / UI Components)
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile. (Components & Libraries / UI Components)
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile. (Components & Libraries / UI Components)
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile. (UI Components / Form)
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile. (Components & Libraries / UI Components)
- awesome-vue - vue-mobile-detection - Vue.js prototype function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile ` 📝 2 years ago` (UI Components [🔝](#readme))
README
# IMPORTANT
**Version 2 of this plugin only works with Vue 3. If you need Vue 2 compatibility install version 1.0.0**# vue-mobile-detection
Vue.js global function `this.$isMobile()` that returns a Boolean value depending on whether or not the user is browsing with a mobile## Demo
https://ajerez.github.io/vue-mobile-detection/
## Installation
#### With npm (Recommended)
```bash
npm i vue-mobile-detection
```#### yarn
```bash
yarn add vue-mobile-detection
```## Usage
#### Plugin installation
```vue
import VueMobileDetection from "vue-mobile-detection";
import App from "./App.vue";const app = createApp(App);
app.use(VueMobileDetection);/* After the install you can use this.$isMobile() in all your vue components */
```#### Using the plugin
```vue
MOBILE
DESKTOP OR TABLET
export default {
created() {
// Use in js
console.log(this.$isMobile());
}
};```
## License
This project is licensed under the terms of the MIT license