
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@xapp/form-widget
Advanced tools
A scheduling widget that supports multi-step forms and displays.
The form widget automatically captures and passes marketing attribution parameters to all API requests for analytics filtering.
utm_source - Traffic source (e.g., "google", "facebook", "newsletter")utm_medium - Marketing medium (e.g., "cpc", "email", "social")utm_campaign - Campaign name (e.g., "spring_sale", "product_launch")utm_term - Paid keywords (for paid search campaigns)utm_content - Ad content identifier (for A/B testing)gclid - Google Click ID (Google Ads auto-tagging)fbclid - Facebook Click IDmsclkid - Microsoft Click ID (Bing Ads)track_* - Any parameter with "track_" prefixTracking parameters are automatically:
attributes fieldAll tracking parameters are included in the request attributes sent to the Stentor API:
// Example API request with tracking data
{
"sessionId": "stentor-form-session-123",
"userId": "user-456",
"attributes": {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "spring_sale",
"gclid": "abc123def456",
"track_landing_page": "homepage"
},
// ... other request data
}
Tracking is enabled by default. The system handles:
No additional configuration is required - the widget will automatically capture and pass through any UTM parameters, click IDs, or custom tracking parameters present in the page URL.
When used standalone: The widget extracts tracking parameters from the page URL on mount and stores them in localStorage with the prefix xa_tracking_.
When embedded in contact-app: Both the contact-app and form-widget will extract and store tracking parameters. This is safe and intentional:
window.location.href)xa_tracking_utm_source, etc.)Storage format: Parameters are stored as JSON objects with expiration:
localStorage.getItem('xa_tracking_utm_source')
// Returns: {"value":"google","expires":1234567890,"stored":1234567890}
The form widget supports multiple field types for building dynamic forms. Below are JSON examples for each supported field type.
Basic text input field with optional formatting (phone, email, address).
{
"name": "full_name",
"type": "TEXT",
"title": "Full Name",
"placeholder": "Enter your name",
"mandatory": true,
"mandatoryError": "Name is required"
}
{
"name": "phone",
"type": "TEXT",
"title": "Phone Number",
"format": "PHONE",
"placeholder": "(555) 555-5555",
"mandatory": true
}
{
"name": "email",
"type": "TEXT",
"title": "Email Address",
"format": "EMAIL",
"placeholder": "you@example.com"
}
{
"name": "description",
"type": "TEXT",
"title": "Description",
"multiline": true,
"rows": 4,
"rowsMax": 8,
"placeholder": "Tell us more..."
}
{
"name": "address",
"type": "TEXT",
"title": "Service Address",
"format": "ADDRESS",
"mapsBaseUrl": "https://maps.googleapis.com/maps/api/place/autocomplete",
"googleMapsApiKey": "YOUR_API_KEY",
"mapsUrlQueryParams": {
"components": "country:us",
"language": "en"
}
}
Single-select dropdown menu.
{
"name": "service_type",
"type": "DROPDOWN",
"title": "Select a service",
"mandatory": true,
"items": [
{
"id": "plumbing",
"label": "Plumbing"
},
{
"id": "electrical",
"label": "Electrical"
},
{
"id": "hvac",
"label": "HVAC"
}
]
}
Allows users to enter custom text when they select specific options.
{
"name": "issue",
"type": "DROPDOWN",
"title": "What issue are you experiencing?",
"items": [
{
"id": "installation",
"label": "Installation"
},
{
"id": "repair",
"label": "Repair"
},
{
"id": "maintenance",
"label": "Maintenance"
},
{
"id": "other",
"label": "Other",
"freeFormInput": true
}
]
}
When freeFormInput: true, selecting that option displays a text input field. The user's typed text becomes the field value instead of the item's ID.
Visual chip-based selection, supports both single and multi-select.
{
"name": "services",
"type": "CHIPS",
"title": "Select services you need",
"minRequired": 1,
"maxAllowed": 3,
"items": [
{
"id": "service1",
"label": "Service 1"
},
{
"id": "service2",
"label": "Service 2",
"selected": true
},
{
"id": "service3",
"label": "Service 3"
}
]
}
{
"name": "membership",
"type": "CHIPS",
"title": "Are you a member?",
"radio": true,
"items": [
{
"id": "yes",
"label": "Yes"
},
{
"id": "no",
"label": "No",
"selected": true
}
]
}
{
"name": "options",
"type": "CHIPS",
"title": "Choose an option",
"items": [
{
"id": "option1",
"label": "Option 1"
},
{
"id": "learn_more",
"label": "Learn More",
"url": "https://example.com/info"
}
]
}
Traditional checkbox or radio button selection.
{
"name": "preferences",
"type": "CHECK",
"title": "Select your preferences",
"items": [
{
"id": "email_updates",
"label": "Email Updates"
},
{
"id": "sms_notifications",
"label": "SMS Notifications"
},
{
"id": "phone_calls",
"label": "Phone Calls"
}
]
}
{
"name": "contact_method",
"type": "CHECK",
"title": "Preferred contact method",
"radio": true,
"items": [
{
"id": "email",
"label": "Email"
},
{
"id": "phone",
"label": "Phone"
},
{
"id": "sms",
"label": "SMS"
}
]
}
Single date selection with optional busy day configuration.
{
"name": "appointment_date",
"type": "DATE",
"title": "Select appointment date",
"mandatory": true,
"defaultBusyDays": {
"blockWeekends": true,
"blockCurrentDay": true,
"blockNextBusinessDays": 1
}
}
{
"name": "service_date",
"type": "DATE",
"title": "Preferred service date",
"defaultBusyDays": {
"availableDays": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"]
}
}
Select a start and end date.
{
"name": "vacation_dates",
"type": "DATERANGE",
"title": "Select date range",
"preselecteDates": {
"from": "2024-01-01",
"to": "2024-01-07"
}
}
Display-only card with optional image, header, and text content.
{
"name": "info_card",
"type": "CARD",
"header": {
"title": "Service Information",
"subheader": "What to expect"
},
"media": {
"imageUrl": "https://example.com/image.jpg",
"alt": "Service image",
"height": 200,
"width": 400
},
"text": "Our technicians will arrive within the scheduled time window.",
"variant": "outlined",
"color": "primary"
}
All field types support these common properties:
name (string, required) - Field identifier used in form datatype (string, required) - Field type (TEXT, DROPDOWN, CHIPS, CHECK, DATE, DATERANGE, CARD)title (string, optional) - Display label for the fieldmandatory (boolean, optional) - Whether the field is requiredmandatoryError (string, optional) - Custom error message when required field is emptycondition (string, optional) - JavaScript expression to conditionally show field (e.g., "service === 'repair'")style (object, optional) - React CSSProperties object for custom stylingshape (string, optional) - Visual shape: "ROUND" or "SQUARE"mandatoryGroup (string, optional) - Group name for "one of" validationFAQs
Form Widget
We found that @xapp/form-widget demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.