email-capture-widget 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +85 -0
  2. package/index.js +27 -0
  3. package/package.json +28 -0
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # email-capture-widget
2
+
3
+ A powerful, customizable email capture widget library for building beautiful lead generation forms. Part of the [Popupsmart](https://popupsmart.com) ecosystem for conversion optimization and marketing.
4
+
5
+ ## Description
6
+
7
+ **email-capture-widget** provides pre-built, responsive email capture forms and widgets designed to maximize newsletter signups and lead generation. Whether you need a simple inline form or an eye-catching popup widget, this package offers ready-to-use templates that integrate seamlessly into any web application.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install email-capture-widget
13
+ ```
14
+
15
+ ## Basic Usage
16
+
17
+ ```javascript
18
+ import { EmailCaptureWidget } from 'email-capture-widget';
19
+
20
+ // Initialize a basic email capture form
21
+ const widget = new EmailCaptureWidget({
22
+ container: '#signup-form',
23
+ template: 'newsletter',
24
+ onSubmit: (email) => {
25
+ console.log('Captured email:', email);
26
+ }
27
+ });
28
+
29
+ widget.render();
30
+ ```
31
+
32
+ ### Using Pre-built Templates
33
+
34
+ ```javascript
35
+ import { EmailCaptureWidget, Templates } from 'email-capture-widget';
36
+
37
+ // Use the lead capture template with custom styling
38
+ const leadForm = new EmailCaptureWidget({
39
+ container: '#lead-form',
40
+ template: Templates.LEAD_CAPTURE,
41
+ theme: {
42
+ primaryColor: '#4F46E5',
43
+ borderRadius: '8px'
44
+ },
45
+ fields: ['email', 'name'],
46
+ submitText: 'Get Started Free'
47
+ });
48
+
49
+ leadForm.render();
50
+ ```
51
+
52
+ ## Key Features
53
+
54
+ - **Pre-built Templates** — Ready-to-use designs for newsletter signups, lead capture, and promotional campaigns
55
+ - **Fully Customizable** — Easily adjust colors, fonts, fields, and layout to match your brand
56
+ - **Responsive Design** — Mobile-friendly widgets that look great on any device
57
+ - **Lightweight & Fast** — Minimal footprint with zero dependencies for optimal performance
58
+ - **Validation Built-in** — Client-side email validation with customizable error messages
59
+
60
+ ## Configuration Options
61
+
62
+ | Option | Type | Default | Description |
63
+ |--------|------|---------|-------------|
64
+ | `container` | string | required | CSS selector for the target element |
65
+ | `template` | string | `'default'` | Template name (`newsletter`, `lead-capture`, `minimal`) |
66
+ | `theme` | object | `{}` | Custom styling options |
67
+ | `fields` | array | `['email']` | Form fields to display |
68
+ | `submitText` | string | `'Subscribe'` | Submit button text |
69
+ | `onSubmit` | function | `null` | Callback function triggered on form submission |
70
+ | `onError` | function | `null` | Callback function for handling errors |
71
+ | `placeholder` | string | `'Enter your email'` | Email input placeholder text |
72
+
73
+ ## About Popupsmart
74
+
75
+ This package is part of the **Popupsmart** ecosystem — a no-code popup builder and conversion optimization platform trusted by thousands of businesses worldwide. Build high-converting popups, forms, and marketing campaigns without writing code.
76
+
77
+ Learn more at [https://popupsmart.com](https://popupsmart.com)
78
+
79
+ ## License
80
+
81
+ MIT License
82
+
83
+ Copyright (c) Popupsmart
84
+
85
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software.
package/index.js ADDED
@@ -0,0 +1,27 @@
1
+ /**
2
+ * email-capture-widget
3
+ * Beautiful email capture forms and widgets for lead generation
4
+ *
5
+ * @module email-capture-widget
6
+ * @author Popupsmart
7
+ * @license MIT
8
+ */
9
+
10
+ module.exports = {
11
+ name: 'email-capture-widget',
12
+ version: '1.0.0',
13
+ description: 'Beautiful email capture forms and widgets for lead generation',
14
+ homepage: 'https://popupsmart.com',
15
+
16
+ /**
17
+ * Initialize the package
18
+ * @returns {Object} Package information
19
+ */
20
+ init: function() {
21
+ return {
22
+ name: this.name,
23
+ version: this.version,
24
+ homepage: this.homepage
25
+ };
26
+ }
27
+ };
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "email-capture-widget",
3
+ "version": "1.0.0",
4
+ "description": "Beautiful email capture forms and widgets for lead generation",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/popupsmart/email-capture-widget.git"
12
+ },
13
+ "homepage": "https://popupsmart.com",
14
+ "keywords": [
15
+ "popup",
16
+ "marketing",
17
+ "conversion",
18
+ "popupsmart",
19
+ "email",
20
+ "capture",
21
+ "widget"
22
+ ],
23
+ "author": "Popupsmart",
24
+ "license": "MIT",
25
+ "bugs": {
26
+ "url": "https://github.com/popupsmart/email-capture-widget/issues"
27
+ }
28
+ }