A lightweight embeddable UI component for partners, agencies, and websites to display and search Travware travel packages—with zero backend integration on your side.
The Travware Packages Widget (<travware-packages-widget>) is a lightweight embeddable UI component that lets partners, agencies, and websites display and search Travware travel packages directly on their platform—with zero backend integration required on your side.
It is implemented as a Web Component, so it works across:
Plain HTML websites
React applications (Vite, Next.js, CRA)
Angular applications
WordPress sites
Shopify custom pages
Any modern frontend framework that supports custom elements
CDN delivery
Load packages-widget.js from the Travware CDN—cached, versioned, and framework-agnostic.
Shadow DOM
UI is isolated from host CSS. Configure branding via attributes, not global stylesheets.
Powered by End to End County
Enterprise travel infrastructure with optional custom API backends for white-label portals.
Quick Start
Add the widget anywhere on your page, then load the script. The widget auto-initializes when the bundle is ready.
That’s it. For framework-specific setup, see the Integration Guide (HTML, React, Next.js, Angular, WordPress, Shopify, Vanilla JS).
Integration Guide
Choose your stack below. Every integration loads the same official Travware CDN script and renders <travware-packages-widget> with identical attributes.
Script loads from CDN: https://packages-widget.vercel.app/packages-widget.js
Custom element registers:<travware-packages-widget>
Widget initializes UI and fetches packages from the configured API
Renders search UI, filters, package cards, and booking entry points inside Shadow DOM
Example Full Integration
Complete HTML page
<!DOCTYPE html><html><head><title>Travel Portal</title></head><body><h1>Find Your Package</h1><travware-packages-widgetlocale="en"theme="dark"primary-color="#22d3ee"search-currency="EGP"api-base-url="https://dev-back.travware.info"api-origin="https://b2e.dartstravelers.com"></travware-packages-widget><scriptsrc="https://packages-widget.vercel.app/packages-widget.js"></script></body></html>
Performance Notes
Lazy-loaded UI—loads when the script executes on your page
No dependency on the host framework (React, Angular, etc.)
Shadow DOM isolation prevents style conflicts with your site CSS
CDN-cached assets for fast global delivery
Security
API requests are origin-validated on the backend
Optional api-origin enforcement for white-label deployments
Shadow DOM prevents direct DOM pollution from host page scripts
Live Demo
Full landing page with hero, features, live travware-packages-widget, testimonials, and CTA—loaded from
https://packages-widget.vercel.app/packages-widget.js.
Troubleshooting
Widget not loading
Confirm https://packages-widget.vercel.app/packages-widget.js returns HTTP 200 in the Network tab.
Add the CDN host to your Content-Security-Policy script-src if you use CSP.
Use the exact tag name travware-packages-widget (lowercase, hyphenated).
Script errors
Do not load the script twice on the same page (duplicate custom element registration).
In React/Angular, load the script once in useEffect / ngOnInit, not on every render.
For TypeScript + React, add the JSX.IntrinsicElements declaration from the Installation section.
CORS issues
When using api-base-url or api-origin, the API must allow your site origin.
Verify preflight OPTIONS responses for authenticated endpoints.
Empty widget / no packages
Check api-base-url points to an environment with published inventory.
Align search-currency with your catalog (default is USD).
Inspect XHR/fetch failures (401, 403, 404) in DevTools.
FAQ
No. The default CDN integration requires only the script tag and custom element. Use api-base-url only when connecting to a custom Travware backend.
Yes. Plain HTML with the script tag is fully supported.
en, ar (RTL), and fr via the locale attribute.
Yes. See Installation for Gutenberg HTML blocks, functions.php enqueue, and Shopify liquid sections.