Wowerlay
Wowerlay is a popover library for Vue 3 applications. It isn't an alternative for Popper.
Intallation
For npm:
npm install wowerlay
For pnpm:
pnpm install wowerlay
For yarn:
yarn add wowerlay
Usage
First you need to register the plugin and import stylesheet
.
main.js | main.ts
Using Wowerlay.
To make Wowerlay visible you must set visibility
to true
and give a target element, template refs can be given.
Anthing goes to <Wowerlay/>
will be unmounted when visibility
is false
and you can change tag of <Wowerlay/>
wrapper with tag
prop.
If you don't want to use v-model:visible
syntax you can use the following one:
If you don't want to prevent attribute inheritance
you can use
<Wowerlay/>
component inside of an element, it will work as expected because it'll be teleported
to body
eventually.
Styling Wowerlay
Styling wowerlay is simple. <Wowerlay/>
is just a single wrapper element.
!! You shouldn't change necessary styles !!
Emits
Props
What about TypeScript?
This package has built-in TypeScript support for events and props. It works with JSX | TSX
and Render Functions
with type support.
To have types support in vue files we recommend you to use Volar
.
Volar
TypeScript Vue Plugin