For Vue 2 projects, use the vue2 NPM tag.
Install the package:
npm i floating-vue@vue2
# or
yarn add floating-vue@vue2
# or
pnpm add floating-vue@vue2
Register the plugin or components using the Vue 2 API:
import Vue from 'vue'
import FloatingVue from 'floating-vue'
import 'floating-vue/dist/style.css'
// As a plugin
Vue.use(FloatingVue)
// Or manually
import {
vTooltip,
vClosePopper,
Dropdown,
Tooltip,
Menu
} from 'floating-vue'
Vue.directive('tooltip', vTooltip)
Vue.directive('close-popper', vClosePopper)
Vue.component('VDropdown', Dropdown)
Vue.component('VTooltip', Tooltip)
Vue.component('VMenu', Menu)