vue3-portal
Version:
Portal for Vue 3
47 lines (28 loc) • 628 B
Markdown
Inspired by [portal-vue](https://github.com/LinusBorg/portal-vue)
Not compatible with Vue 2
- [Installation](
- [Usage](
```sh
npm install vue3-portal
```
You can define your custom breakpoints:
```js
import { createApp } from 'vue';
import Portal from 'vue3-portal';
const app = createApp({});
app.use(Portal);
app.mount('#app');
```
```html
<portal to="des">
<!-- Use whatever you want to teleport inside portal-target -->
</portal>
<portal-target name="des" />
```