portal-vue

esm cjs
> A Portal Component for Vue 3, to render DOM outside of a component, anywhere in the document.
Version 3.0.0 License MIT
INSTALL
Type:
Version:
- Static
- Latest Patch
- Latest Minor
- Latest Major
- 3.0.0
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.5.1
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- 3.0.0-rc.3
- 3.0.0-rc.2
- 3.0.0-rc.1
- 3.0.0-beta.0
- 3.0.0-alpha.0
- 2.0.0-rc.1
- 2.0.0-beta.3
- 2.0.0-beta.2
- 2.0.0-beta.1
- 2.0.0-beta.0
- 1.5.1-beta.1
- 1.5.1-beta.0
- 1.4.0-beta.1
- 1.4.0-beta.0
- 1.3.0-beta.0
- 1.2.1-beta.1
- 1.0.0-beta.5
- 1.0.0-beta.4
- 1.0.0-beta.3
- 1.0.0-beta.2
- 1.0.0-beta.1
PortalVue
A Portal Component for Vue 3, to render DOM outside of a component, anywhere in the document.
For more detailed documentation and additional Information, please visit the docs.
Looking for the version for Vue 2.*? Docs for PortalVue 2.*, compatible with Vue 2, are here
Installation
npm i portal-vue
# or
yarn add portal-vue
import PortalVue from 'portal-vue'
Vue.use(PortalVue)
Usage
<portal to="destination">
<p>This slot content will be rendered wherever the <portal-target> with name 'destination'
is located.</p>
</portal>
<portal-target name="destination">
<!--
This component can be located anywhere in your App.
The slot content of the above portal component will be rendered here.
-->
</portal-target>
Nuxt module
Add portal-vue/nuxt
to modules section of nuxt.config.js
{
modules: ['portal-vue/nuxt']
}