vue-browser-detect-plugin

Simple browser detection plugin for Vue.
192,246
Install
npm install vue-browser-detect-plugin
Latest Version:0.1.18
Vue:2
License:MIT
Last Updated:Sep 4, 2021
Links: npm
Maintainer: cschweda

Vue Browser Detect Plugin

License: MIT

Simple plugin for Vue that detects browser name, version, and user-agent.

Installation

npm install vue-browser-detect-plugin

In your main.js:

import browserDetect from "vue-browser-detect-plugin";
Vue.use(browserDetect);

Usage

Browser info:

  • vm.$browserDetect.isIE boolean

  • vm.$browserDetect.isChrome boolean

    • Note: This is Chrome desktop.
  • vm.$browserDetect.isFirefox boolean

  • vm.$browserDetect.isOpera boolean

  • vm.$browserDetect.isSafari boolean

  • vm.$browserDetect.isEdge boolean

  • vm.$browserDetect.isChromeIOS boolean

  • vm.$browserDetect.isIOS boolean

Additional meta info:

  • vm.$browserDetect.meta.name Chrome, IE, Edge, etc.

  • vm.$browserDetect.meta.version Version

  • vm.$browserDetect.meta.ua user-agent

Demo

https://vue-browser-detect.netlify.com/

Nuxt.js

Add vue-browser-detect-plugin/nuxt to the buildModules section of nuxt.config.js

export default {
  buildModules: [
    'vue-browser-detect-plugin/nuxt'
  ]
}

:warning: If you are using Nuxt < v2.9 you have to install the module as a dependency (No --dev or --save-dev flags) and use modules section in nuxt.config.js instead of buildModules.

CHANGLOG

See CHANGELOG.md

Related Packages

vue

The progressive JavaScript framework for building modern web UI.

588,019,132 54,801
vue
@vueuse/shared
372,738,348 22,398
@vueuse/core

Collection of essential Vue Composition Utilities

367,188,523 22,398
@vitejs/plugin-vue

The official plugin for Vue SFC support in Vite.

333,357,380 686

Version History

Version Released License
0.1.18 MIT
0.1.17 MIT
0.1.16 MIT
0.1.15 MIT
0.1.14 MIT