Frameworks and CSP
Two ways in everywhere: the hosted script tag, or the @devalender/widget npm package. Pick the package when you want typed React props and bundled code; pick the script tag when you cannot run a build.
Next.js App Router
With the npm package, use the React wrapper from a client component. The wrapper renders nothing during server rendering and defines the elements after mount, so there is no hydration mismatch.
'use client';
import { DevalenderBooking } from '@devalender/widget/react';
export function BookingEmbed() {
return <DevalenderBooking handle="ada" event="intro-call" />;
}With the script tag, load it with next/script and use the element directly. Add import '@devalender/widget/jsx' once to type the element, or skip the typing and use the React wrapper.
import Script from 'next/script';
import '@devalender/widget/jsx';
export default function Page() {
return (
<main>
<Script
src="https://devalender.com/widget.js"
strategy="afterInteractive"
/>
<devalender-booking handle="ada" event="intro-call" />
</main>
);
}React with Vite
import { DevalenderBooking } from '@devalender/widget/react';
export default function App() {
return (
<main>
<DevalenderBooking handle="ada" event="intro-call" accent="#7c3aed" />
</main>
);
}Plain HTML
<script src="https://devalender.com/widget.js"></script>
<devalender-booking handle="ada" event="intro-call"></devalender-booking>WordPress
Add a Custom HTML block where the widget should appear and paste the plain HTML snippet above. If your theme strips <script> tags from posts, add the <script src="https://devalender.com/widget.js"> line once through a header and footer plugin, and keep only the <devalender-booking> tag in the block.
Webflow
Drag an Embed element onto the page and paste the snippet. Custom code embeds need a paid Webflow site plan. Publish to see it: the Designer does not run the script.
Squarespace
Add a Code block and paste the snippet, with "Display Source" off. Code blocks need a Business plan or higher.
Content-Security-Policy
If your site sets a CSP, allow the script and the API calls it makes:
script-src 'self' https://devalender.com;
connect-src 'self' https://devalender.com;The widget runs in a shadow root and injects its own styles, so style-src needs 'unsafe-inline', or a nonce on your own styles will not apply. When you self-host via the npm package, script-src needs nothing for devalender, but connect-src still needs https://devalender.com, or your own origin if you set api-url.