@s3rver/nuxt-modal
v1.1.5
Published
Very simple modal for nuxt framework
Downloads
25
Maintainers
Readme
Very simple modal for nuxt framework
Demo Page
https://user-images.githubusercontent.com/51977254/169375875-33904498-5449-42b4-89c9-77c9f22909ef.mp4
# install module
$ npm i @s3rver/nuxt-modal
Steps of use
1 - Add module to nuxt.config.js
// nuxt.config.js
export default {
//...
modules: ['@s3rver/nuxt-modal']
//...
}
2 - Register modals for layout
<template>
<div>
<nuxt />
<!-- added line -->
<register-modals />
</div>
</template>
3 - Making directory modals
In the main root of the project, create a directory called modals
and save your modals with the vue
extension
options
nuxt.config.js
default
options
// nuxt.config.js
export default {
//...
modal: {
pluginName: "modal", // name plugin
layout: "default", // layout desktop
mobileLayout: "defaultMobile", // layout mobile
mobileSize: 400, // mobile or desktop window size
responsive: false,
},
modules: ['@s3rver/nuxt-modal']
//...
}