Introduction
Embed Residently property listing and enquiry flows within your web application.
Getting Started
Installation
Get started by adding the Residently Embed SDK to your web application.
- npm
- yarn
- inline
npm install @residently/embed-sdk --save
yarn add @residently/embed-sdk
Place the script just before the closing body tag if your page.
<script src="https://embed.residently.com/residently-embed-sdk.js"></script>
Usage
- module
- inline
In your web application import @residently/embed-sdk and instatiate a new client
import Residently from '@residently/embed-sdk';
// Create a Residently instance.
const residently = new Residently();
Place the script just before the closing body tag if your page.
<script src="https://embed.residently.com/residently-embed-sdk.js"></script>
// Create a Residently instance.
const residently = new Residently();
For example, to a embed a property listing collection, call embedView
residently.embedView("collection", {
container: document.getElementById("#id-of-element-to-render-into"),
collectionToken: "<provided_by_residently_team>"
});
Events
A Residently instance emits a variety of events depending on the view being embedded.
See individual view documentation for specific events.
loaded
When an embedded view has finishing loading
Example usage
residently.on("loaded", () => {
console.log("View has loaded");
});
Support
If you have any questions about or issues with Residently Embed SDK, please reach out to our team hello@residently.com.