Integrations
React
Embed a BANANA-GOAT viewer in a React app using the tokenized embed route.
Recommended pattern
The simplest secure integration is an iframe pointed at /embed/{token}. Keep token creation on your server. Pass only the public embed URL into the React tree.
Example component
function SecureModelEmbed({ token }: { token: string }) {
const src = `https://app.banana-goat.com/embed/${token}`;
return (
<iframe
title="Secure 3D viewer"
src={src}
width="100%"
height={420}
allow="fullscreen"
loading="lazy"
/>
);
}
Create and revoke tokens from your backend with the platform API. Never put API keys in React bundles.
UX tips
Reserve a fixed height so layout does not jump. Lazy-load below-the-fold embeds. Provide a fallback message if the token is missing or revoked.
