vue3-detect-browser

Plugin for Vue3 (Option API and Composition API) that detects browser name, version, and user-agent
20,678
Install
npm install vue3-detect-browser
Latest Version:0.1.2
Vue:3
License:MIT
Last Updated:Feb 26, 2024
Links: npm
Maintainer: thomergil

vue3-detect-browser

Plugin (with TypeScript support) for Vue3 that detects browser name, version, and user-agent. This is a fork of https://github.com/smg99/vue-detect-browser.

Installation with npm

npm i vue3-detect-browser

Installation with yarn

yarn add vue3-detect-browser

Option API Usage

In your main.js:

import detectBrowser from "vue-detect-browser";
app.use(detectBrowser);

Browser

In any component file it is available as this.detectBrowser data property

this.detectBrowser.isChrome
this.detectBrowser.isFirefox
this.detectBrowser.isOpera
this.detectBrowser.isSafari
this.detectBrowser.isEdge
this.detectBrowser.isChromeIOS
this.detectBrowser.isIOS
this.detectBrowser.isIE

Composition API Usage

<script setup>
import { useBrowserDetect } from 'vue3-detect-browser';
const { isFirefox, isChrome } = useBrowserDetect();
</script>

Related Packages

vue-detect-browser

Plugin for Vue3 that detects browser name, version, and user-agent

38,549 1
@clalarco/vue3-plotly

Vue 3 component for plotly.js, with Typescript support

28,421
bump-ui

Bump-UI for Vue 3+

713
youtube-vue3

Youtube player component for vue.js 3.x

141,913 26
verte-vue3

Vue Color Picker

48,073 6

Version History

Version Released License
0.1.2 MIT
0.1.1 MIT
0.1.0 MIT