A package that provides a simple way to embed the Elfsquad showroom in your website.
npm install --save @elfsquad/showroom-iframe
<script type="importmap>
{
"imports": {
"@elfsquad/showroom-iframe": "https://cdn.skypack.dev/@elfsquad/showroom-iframe@1.0.1"
}
}
</script>
This package exposes the ElfsquadShowroom
class. This class can be
used for creating & communicating with the iframe.
Example:
import { ElfsquadShowroom } from "@elfsquad/showroom-iframe";
const container = document.createElement("div");
document.body.appendChild(container);
const elfsquad = new ElfsquadShowroom({
container: container,
url: "https://automotive.elfsquad.io/configure/Elfsquad%20carrosserie"
});
import { ScreenshotCallback } from "@elfsquad/showroom-iframe";
const callback: ScreenshotCallback = ({image}) => {
console.log('image: ', image);
}
elfsquad.onScreenshot(callback);
We welcome contributions! Please feel free to fork the repository, make your changes, and submit a pull request.