@enquio/vue-popup
v1.0.2
Published
Vue 3 popup component for Enquio Web Component
Maintainers
Readme
@enquio/vue
Vue 3 wrapper component for the Enquio popup Web Component. Provides a Vue-idiomatic interface to integrate Enquio popups into your Vue applications.
📦 Installation
npm install @enquio/vue✅ Requirements
- Vue: ^3.2.0
🚀 Quick Start
Basic Usage
<script setup>
import { EnquioPopup } from '@enquio/vue';
const projectId = 'your-project-id';
</script>
<template>
<div>
<h1>My App</h1>
<EnquioPopup :projectId="projectId" />
</div>
</template>With Composition API
<script setup>
import { ref } from 'vue';
import { EnquioPopup } from '@enquio/vue';
const projectId = ref('your-project-id');
const handleSwitch = () => {
projectId.value = 'different-project-id';
};
</script>
<template>
<div>
<button @click="handleSwitch">Switch Project</button>
<EnquioPopup :projectId="projectId" />
</div>
</template>With Options API
<script>
import { EnquioPopup } from '@enquio/vue';
export default {
components: {
EnquioPopup,
},
data() {
return {
projectId: 'your-project-id',
};
},
};
</script>
<template>
<div>
<h1>My App</h1>
<EnquioPopup :projectId="projectId" />
</div>
</template>📖 API
EnquioPopup
A Vue component that renders the Enquio popup Web Component.
Props
| Prop | Type | Required | Description |
|------|------|----------|-------------|
| projectId | string | Yes | Your Enquio project ID |
Example
<EnquioPopup projectId="abc-123-def-456" />🔗 Dependencies
@enquio/core: Core script loadervue: Peer dependency (must be installed separately)
📝 License
MIT © Enquio Team
