@hashicorp/react-newsletter-signup-formdeprecated

a form used to sign up for the email newsletter

Usage no npm install needed!

<script type="module">
  import hashicorpReactNewsletterSignupForm from 'https://cdn.skypack.dev/@hashicorp/react-newsletter-signup-form';
</script>

README

Newsletter Signup Form

A form used to sign up for the email newsletter

Props

  • buttonText (string) [optional] - Text for the form's submit button
  • placeholder (string) [optional] - Placeholder text for the email input field.
  • placement (option, ["mega-nav","footer","subscribe-module"]) - Used for analytics, tracked under Newsletter Signup as signup_type on form submission.
  • allowHorizontalLayout (boolean) [optional] - If true, submit button will be displayed to the right of the text input on viewports 768px wide and above. Defaults to true.
  • theme (object) [optional] - Controls the appearance of the form. theme.background should be one of ["light", "dark", "brand"].
  • submitEndpoint (string) [optional] - URL to which the form and analytics data will be POSTed. Intended for use in testing. Defaults to https://util.hashicorp.com/forms/standard.
  • finished (function) [optional] - Callback function to be called on success or on error after form submission is attempted. This function will be passed a single argument, being an object { error }, where error is an error message string if the submission errored, or null if the submission was successful.

Dependents

  • email-subscribe
  • footer
  • mega-nav

Depends On

  • hashi-button
  • hashi-checkbox-input
  • hashi-text-input
  • localstorage-polyfill