How to embed testimonials to any ReactJs site.

Looking to embed your cool testimonial widget into your react js site.

First, we will need to use iframe-resizer-react library. Install it via npm command:

npm install --save iframe-resizer-react

Once the library is installed, import the IframeResizer component:

import IframeResizer from 'iframe-resizer-react'

To implement the component, please utilize the following code:

<IframeResizer src="https://app.socialprf.io/carousal" style={{ width: "1px", minWidth: "100%" }} />

It is recommended to set the width to 100% and have the height adjust to fit the content.

To obtain the testimonial widget URL, go to the widgets section in your socialprf account and click copy url:

The copied URL will look like this

https://app.socialprf.io/carousal?recordId=recBUKxQ0YMikh9jV&collectionId=recYgHUd8eZscTQEi

Then, paste the URL into the src prop of the IframeResizer component.

That concludes the process. 🥳

Not working? Just us an email to kamal@socialprf.io and we’ll assist you.

Last updated