This page is about version 3.151.2 of the app, which is not the most recent version. The latest stable version is 3.178.5.
:warning: The Newsletter block has been deprecated in favor of the Newsletter app. Although support for this block is still granted, we strongly recommend you to update your store theme with the Product Specification's blocks in order to keep up with the component's evolution.
newsletter is a block that displays a newsletter form.
Configuration
- Add the
vtex.store-componentapp to your theme's dependencies in themanifest.json;
_10 "dependencies": {_10 "vtex.store-components": "3.x"_10 }
- Add the
newsletterblock. For example:
_10 "store.home": {_10 "children": [_10 "newsletter",_10 ]_10 },
Props
| Prop name | Type | Description | Default value |
|---|---|---|---|
label | String | Label of the form used by the component | Subscribe to our newsletter (translated text) |
placeholder | String | Placeholder of the email input | Enter your email address (translated text) |
submit | String | Label of the submit button | Sign up (translated text) |
hideLabel | Boolean | Hide label | false |
Customization
In order to apply CSS customizations in this and other blocks, follow the instructions given in the recipe on Using CSS Handles for store customization.
| CSS Handles |
|---|
newsletter |
container |
form |
inputGroup |
buttonContainer |
label |
error |
confirmation |
confirmationTitle |
confirmationText |