https://github.com/LinusBorg/portal-vue
A feature-rich Portal Plugin for Vue 3, for rendering DOM outside of a component, anywhere in your app or the entire document. (Vue 2 version: v2.portal-vue.linusb.org)
https://github.com/LinusBorg/portal-vue
portal vuejs
Last synced: about 1 month ago
JSON representation
A feature-rich Portal Plugin for Vue 3, for rendering DOM outside of a component, anywhere in your app or the entire document. (Vue 2 version: v2.portal-vue.linusb.org)
- Host: GitHub
- URL: https://github.com/LinusBorg/portal-vue
- Owner: LinusBorg
- License: mit
- Created: 2016-12-31T12:33:09.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2023-11-25T19:14:42.000Z (over 1 year ago)
- Last Synced: 2024-10-29T10:52:39.354Z (6 months ago)
- Topics: portal, vuejs
- Language: Vue
- Homepage: http://portal-vue.linusb.org
- Size: 3.53 MB
- Stars: 3,891
- Watchers: 35
- Forks: 185
- Open Issues: 37
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-github-vue - portal-vue - 在组件外部渲染DOM (实用库)
- awesome-vue - portal-vue - 在组件外部渲染DOM (实用库)
- awesome-github-vue - portal-vue - 在组件外部渲染DOM (实用库)
- awesome - portal-vue - 在组件外部渲染DOM (实用库)
- awesome-vue - portal-vue - vue?style=social) - 在组件外部渲染DOM (实用库)
README
# 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](https://next.portal-vue.linusb.org).
> Looking for the version for Vue 2.\*? [Docs for PortalVue 2.*, compatible with Vue 2, are here](https://v2.portal-vue.linusb.org)
## Installation
```bash
npm i portal-vue# or
yarn add portal-vue
``````javascript
import PortalVue from 'portal-vue'
Vue.use(PortalVue)
```## Usage
```html
This slot content will be rendered wherever the with name 'destination'
is located.
```
## Nuxt module
v3 does not yet have a nuxt module integration. PRs welcome.