Overview
View sourceA small browser loader for adding Catalog3D to a product page. The merchant page controls placement, dimensions, responsive layout, and appearance.
Five-minute integration
<div id="catalog3d-room" style="height:680px"></div>
<script src="https://catalog3d.ai/embed/v1/catalog3d.js"></script>
<script>
Catalog3D.mount({
target: "#catalog3d-room",
siteId: "your-publishable-site-id",
productId: "your-product-id",
locale: "en",
appearance: {
theme: "auto",
accentColor: "#274d3d",
fontFamily: "Inter, system-ui, sans-serif",
},
}).then((handle) => {
window.catalog3dRoom = handle;
});
</script>
The promise resolves when Catalog3D is ready. Mounting replaces the target's children, so keep any poster or fallback markup in a sibling element.
Bundler-based apps can skip the tag and import the package instead:
npm install @catalog3d/embed
import { mount } from "@catalog3d/embed";
After catalog3d:room-ready, a host chatbot can submit a plain-language removal
intent:
await window.catalog3dRoom.requestRemoval({
description: "remove the floor lamp beside the sofa",
});
Product identity is immutable. To display another product, call destroy() and
mount a new instance.
Product-page example
examples/product-page is the canonical integration
and visual debugging surface. It demonstrates:
- a responsive merchant-owned product page;
- sizing and placing Catalog3D inside a media gallery;
- appearance tokens;
- ready, room-ready, and error events;
- a host-owned assistant using
requestRemoval({ description }); - cleanup with
destroy().
Run it locally:
npm install
npm run build
npm run example
Then open http://127.0.0.1:4174/examples/product-page/.
Documentation
- Integration guide
- API reference
- Events and errors
- Appearance, sizing, and placement
- React and Next.js
- Security and privacy
- Versioning and migration
Declarative alternative
<script src="https://catalog3d.ai/embed/v1/catalog3d.js"></script>
<catalog3d-room
site-id="your-publishable-site-id"
product-id="your-product-id"
locale="en"
theme="auto"
accent-color="#274d3d"
font-family="Inter, system-ui, sans-serif"
style="display:block;height:680px">
</catalog3d-room>
Attributes are initial configuration. Replace the element to change product identity.
Development
npm install
npm run verify # typecheck, tests, build, package-consumer checks
dist/ is committed because it is the source for the served tag. Rebuild and
commit it with any source change.
License
Code is available under the MIT License. Product-page demo media is Catalog3D example content; see the example's asset notice.