Frameworks
Use TheWebRatings with your favorite framework
TheWebRatings is a pure JavaScript package that works with any JavaScript framework or vanilla HTML. Simply load the script and initialize it - it doesn't require any framework-specific dependencies or build tools.
Universal JavaScript Integration
TheWebRatings works by exposing a global TheWebRatings object that can be accessed from any JavaScript environment. Whether you're using React, Vue, Angular, Svelte, or plain HTML, the integration pattern is the same:
- Load the script (CDN or bundled)
- Initialize with your API key
- Call
open(email, name)to show the widget (or use data-attribute / programmatic trigger)
Framework-specific guides below show the recommended patterns for each ecosystem, but you can adapt the basic JavaScript API to work with any setup.
Framework Guides
Core Frameworks
- Simple HTML - Vanilla HTML and JavaScript integration
- React - React hooks and component patterns
- Vue - Vue 3 composition API and options API
- Angular - Angular components and lifecycle hooks
Full-Stack Frameworks
- Next.js - Next.js App Router and Pages Router
- Nuxt.js - Nuxt 3 with plugins and composables
- SvelteKit - SvelteKit with stores and lifecycle
- Astro - Astro islands and client-side scripts
Mobile & PWA
- Ionic + Capacitor - Mobile apps with Capacitor
- PWA Builder - Progressive Web App integration
- Vite + Workbox - Vite with Workbox service workers
Can't Find Your Framework?
TheWebRatings works with any JavaScript framework. If you don't see your framework listed, follow the Simple HTML guide and adapt it to your framework's lifecycle:
- Load the script in your app entry point or HTML
- Initialize when your app mounts (React
useEffect, VueonMounted, AngularngAfterViewInit, etc.) - Call
TheWebRatings.open(email, name)when you want to show the widget (pass the logged-in user)
The core API is universal - framework guides simply show the best practices for each ecosystem.