Learn more about the NewsletterForm component for newsletter module.
This component can be serve as the form with newsletter input and button to submit the mail to the newsletter provider.
NewsletterForm.vue component accepts several props and slots to allow you to customize it to better fit your needs.
<newsletter-form @subscribed="log" headerText="Cool Newsletter" buttonText="Join in!" inputPlaceholder="Your email"> <template #description> <p>My Newsletter Description</p> </template> <template #button-icon> <!-- icon component --> </template></newsletter-form>NewsletterForm component accepts following props:
headerTextCool NewsletterText that will be placed in the newsletter header.
buttonTextJoin in!Text that will be placed in the newsletter submit button.
inputPlaceholderYour emailText that will be placed in the newsletter input placeholder.
theme{ button: '', input: '', header: '', container: ''}Styling that will be passed to the component. Can by Tailwind class names or regular CSS styling using class names.
NewsletterForm emits following event:
subscribedEvent that is fired after submiting a newsletter form.
NewsletterForm has following slots:
descriptionText that will be placed below header and above the input and button.
button-iconContent that will be placed in the button after the text.
topContent that will be placed above the newsletter header.
bottomContent that will be placed below the newsletter input and button
You can style the NewsletterForm.vue component using normal CSS styling by using classes or by using TailwindCSS classes like following:
<newsletter-form :theme="{ container: 'my-css-class', button: 'py-4' }/>.my-css-class { background-color: red;}