Astro
Add the Feddy widget to an Astro site with two inline scripts in your layout.
By the end of this page your site has a support launcher, and a message sent from it shows up in your Feddy inbox.
Prerequisites
- A Feddy project and its project ID from Settings → Install. Create a project if you have none.
- Nothing to install from npm. The widget is one script served from
core.feddy.app, loaded at runtime.
Add the scripts to your layout
Astro bundles and hoists <script> tags by default. is:inline leaves these two alone so the widget loads exactly as written:
<script is:inline src="https://core.feddy.app/sdk/feddy.js"></script>
<script is:inline>
Feddy.init({ projectId: 'fd_XXXXXXXXXXXXXXXX' })
</script>Put them before the closing </body> tag of the layout every page uses.
The project ID ships in your page source and is public by design. Commit it. Do not put it in a secrets file or an environment variable.
Choose an entry point
The floating launcher appears bottom-right. To use your own control instead, pass launcher: false to init and call Feddy.open() from it. With the <ClientRouter /> view transitions enabled, the widget stays mounted across navigations.
Verify
Open the page, click the control, and send a message. It appears in your Feddy inbox. Reply from the inbox; the reply shows up in the panel.
Next steps
- Identify users so replies can also reach them by email and you see who wrote in.
- Unread badge to drive your own badge from
onUnreadCountChanged. - Web SDK reference for every option and call.