Drop the script tag into your layout. No island, no hydration tax.
Astro ships zero JavaScript by default, and the Usero widget keeps that promise. Use the script tag for a static-site install with no React island, or use the React integration if you already have one.
---
// Astro frontmatter, no React island required
---
<html lang='en'>
<body>
<slot />
<script src='https://unpkg.com/@usero/sdk' is:inline></script>
<script is:inline>
window.addEventListener('DOMContentLoaded', () => {
Usero.initUseroFeedbackWidget({ clientId: 'YOUR_CLIENT_ID' })
})
</script>
</body>
</html>Replace YOUR_CLIENT_ID with the id from your Usero dashboard.
Built for Astro
The vanilla bundle never imports React. Astro stays at zero JS for everything except this widget.
Add the script once to your layout. Every page picks up the widget without per-page wiring.
When the View Transitions API is enabled, the widget survives soft navigations without rebooting.
Loaded from unpkg, served behind a CDN, immutable URLs once you pin a version.
Canny's iframe pulls 200kb on every page and breaks Astro's zero-JS budget. Usero is a single 12kb script.
FAQ
Yes. The vanilla script does not need any of Astro's UI integrations. Drop the <script> tag and you are done.
The widget self-deduplicates: if it sees a stray trigger from a previous page, it reuses the existing instance instead of double-mounting.
No. The script is async by default. It boots after DOMContentLoaded, not before.
Yes. Copy the IIFE bundle from node_modules/@usero/sdk/dist into /public and reference it from your layout.
Free tier. No credit card. Two-minute install. Cancel by deleting two lines of code.
Install guides