@nortic/newsletter-form-vue
v1.2.0
Published
Nortic newsletter subscription form for Vue
Downloads
99
Readme
Nortic Newsletter Subscription - Vue
This is a Vue 3 wrapper for Nortic Newsletter Subscription
Getting started
Install
npm install @nortic/newsletter-form-vue
# yarn add @nortic/newsletter-form-vue
# pnpm add @nortic/newsletter-form-vue
Usage
Component
<script setup lang="ts">
import { SubmissionForm } from '@nortic/newsletter-form-vue'
import '@nortic/newsletter-form-vue/dist/style.css'
</script>
<template>
<SubmissionForm newsletter-id="<your-newsletter-id>" />
</template>
Props
|Property |Type |Required |
|----------------------|------------------------|---------|
|newsletterId |string, number
|Yes |
|options |object
|No |
NOTE: For more information about the available options, please refer to the Nortic Newsletter Form readme.
Events
|Event |Argument | |----------------------|----------------------| |success |N/A | |error |Error | |destroyed |N/A | |reset |N/A | |updated |N/A |
Composable
<script setup lang="ts">
import { SubmissionForm } from '@nortic/newsletter-form-vue'
import '@nortic/newsletter-form-vue/dist/style.css'
const norticSubmissionForm = ref<HTMLElement>()
useNewsletterSubscriptionForm(norticSubmissionForm, {
newsletterId: '<your-newsletter-id>',
// options: A third, optional, argument can be passed
})
</script>
<template>
<div ref="norticSubmissionForm" />
</template>