@nortic/newsletter-form-vue
Nortic newsletter subscription form for Vue
2,541
3
| Install | |
|---|---|
npm install @nortic/newsletter-form-vue |
|
| Latest Version: | 1.3.0 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Oct 1, 2026 |
| Links: | GitHub · npm |
Maintainer: hanniz_nortic
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 (UUID) |
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 |
NOTE: If the email address is already subscribed, the form shows the success view and emits success, not error.
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>
Custom form
submitSubscription and the error helpers are re-exported from the core package, so you can build your own form:
import { isAlreadySubscribedError, submitSubscription } from '@nortic/newsletter-form-vue'
try {
await submitSubscription('<your-newsletter-id>', { email })
}
catch (error) {
if (isAlreadySubscribedError(error)) {
/* The email is already subscribed, treat it as a success */
}
}
For all error codes, see Error handling in the core package readme.
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.3.0 | ^3.0.0 | MIT | |
| 1.2.6 | ^3.0.0 | MIT | |
| 1.2.4 | ^3.0.0 | MIT | |
| 1.2.3 | ^3.0.0 | MIT | |
| 1.2.2 | ^3.0.0 | MIT | |
| 1.2.1 | ^3.0.0 | MIT | |
| 1.2.0 | ^3.0.0 | MIT | |
| 1.1.6 | ^3.0.0 | MIT | |
| 1.1.5 | ^3.0.0 | MIT | |
| 1.1.4 | ^3.0.0 | MIT | |
| 1.1.3 | ^3.0.0 | MIT | |
| 1.1.2 | ^3.0.0 | MIT | |
| 1.1.1 | ^3.0.0 | MIT | |
| 1.1.0 | ^3.0.0 | MIT | |
| 1.0.3 | ^3.0.0 | MIT | |
| 1.0.2 | ^3.0.0 | MIT | |
| 1.0.1 | ^3.0.0 | MIT | |
| 0.2.2 | ^3.0.0 | MIT | |
| 0.2.1 | ^3.0.0 | MIT | |
| 0.2.0 | ^3.0.0 | MIT | |
| 0.1.2 | ^3.0.0 | MIT | |
| 0.1.1 | ^3.0.0 | MIT | |
| 0.1.0 | ^3.0.0 | MIT | |
| 0.0.44 | ^3.0.0 | MIT | |
| 0.0.43 | ^3.0.0 | MIT | |
| 0.0.42 | ^3.0.0 | MIT | |
| 0.0.41 | ^3.0.0 | MIT | |
| 0.0.40 | ^3.0.0 | ISC | |
| 0.0.38 | ^3.0.0 | ISC | |
| 0.0.37 | ^3.0.0 | ISC |
Showing the latest 30 of 44. See every release on npm
Pre-releases (9)
| Version | Released | Vue | License |
|---|---|---|---|
| 1.2.2-beta.0 | ^3.0.0 | MIT | |
| 1.2.0-beta.9 | ^3.0.0 | MIT | |
| 1.2.0-beta.8 | ^3.0.0 | MIT | |
| 1.2.0-beta.7 | ^3.0.0 | MIT | |
| 1.2.0-beta.5 | ^3.0.0 | MIT | |
| 1.2.0-beta.4 | ^3.0.0 | MIT | |
| 1.2.0-beta.3 | ^3.0.0 | MIT | |
| 1.2.0-beta.2 | ^3.0.0 | MIT | |
| 1.2.0-beta.1 | ^3.0.0 | MIT |