Early research preview — this project is an experiment and may change significantly.
Bloktastic

forms

Newsletter Section

Email capture section for newsletter subscriptions and lead generation.

#newsletter#email#lead#signup

Storyblok Schema

json

{
  "$bloktastic": {
    "version": "1.0.0"
  },
  "name": "newsletter_section",
  "display_name": "Newsletter Section",
  "is_root": false,
  "is_nestable": true,
  "schema": {
    "headline": {
      "type": "text",
      "pos": 0,
      "display_name": "Headline",
      "description": "Signup heading",
      "required": true
    },
    "subline": {
      "type": "textarea",
      "pos": 1,
      "display_name": "Subline",
      "description": "Optional helper copy"
    },
    "placeholder": {
      "type": "text",
      "pos": 2,
      "display_name": "Input Placeholder",
      "description": "Email placeholder text"
    },
    "button_label": {
      "type": "text",
      "pos": 3,
      "display_name": "Button Label",
      "description": "Submit button text",
      "required": true
    },
    "consent_text": {
      "type": "text",
      "pos": 4,
      "display_name": "Consent Text",
      "description": "Privacy/compliance helper text"
    },
    "success_message": {
      "type": "text",
      "pos": 5,
      "display_name": "Success Message",
      "description": "Message shown on successful submit"
    }
  },
  "preview_field": "headline"
}

Generation Prompt

md

# Newsletter Section

## Purpose
Email capture section for newsletter subscriptions and lead generation.

## Storyblok Schema Fields
- `headline` (text, required): Signup heading
- `subline` (textarea): Optional helper copy
- `placeholder` (text): Email placeholder text
- `button_label` (text, required): Submit button text
- `consent_text` (text): Privacy/compliance helper text
- `success_message` (text): Message shown on successful submit

## Visual Requirements
- Design for responsive marketing pages (mobile, tablet, desktop).
- Keep spacing and hierarchy clear for conversion-focused sections.
- Support optional content gracefully without visual gaps.

## Accessibility
- Use semantic sectioning and heading structure.
- Ensure interactive elements are keyboard reachable with visible focus states.
- Maintain WCAG-compliant contrast in all supported styles.

## Example Props Structure
```typescript
interface NewsletterSectionProps {
  // Map Storyblok fields to your frontend props here
}
```

## Edge Cases
- Missing optional media or links.
- Extremely long text content.
- Empty collections in nested blok fields.

README

md

# @bloktastic/newsletter-section

Email capture section for newsletter subscriptions and lead generation.

## Installation

```bash
bloktastic add @bloktastic/newsletter-section
```

## Fields

| Field | Type | Required | Description |
|---|---|---|---|
| headline | text | Yes | Signup heading |
| subline | textarea | No | Optional helper copy |
| placeholder | text | No | Email placeholder text |
| button_label | text | Yes | Submit button text |
| consent_text | text | No | Privacy/compliance helper text |
| success_message | text | No | Message shown on successful submit |

## Notes
- Category: `forms`
- Tags: `newsletter`, `email`, `lead`, `signup`