Peerby Widget - User documentation

Introduction

The peerby widget makes it easy to integrate Peerby on your website. The Peerby widget offers viewers the opportunity to directly start a search request on peerby.com or respond to requests posted by their neighbours.

Embedding the widget

In order to embed the Peerby widget on your website you will need to include an iframe HTML element on the location where you would like to display the peerby widget. The following code segment shows how to embed the Peerby widget.

<iframe
    allowtransparency="true"
    frameborder="0"
    hspace="0"
    marginheight="0"
    marginwidth="0"
    name="peerby_widget"
    vspace="0"
    src="http://widget.peerby.com/?country=$country&locality=$locality" height="$height" width="$width">
</iframe>

Example of Peerby in Amsterdam

Code

<iframe 
    allowtransparency="true"
    frameborder="0"
    height="500"
    hspace="0"
    id="peerby_widget"
    marginheight="0"
    marginwidth="0"
    name="peerby_widget"
    src="http://widget.peerby.com/?country=nl&locality=amsterdam"
    vspace="0"
    width="195px">
</iframe>

Result

Dimensions

The Peerby widget is flexible and adaptive, functioning at a variety of dimensions ranging from wide to narrow, and short to tall. The default dimensions for a timeline are 195px * 500px, which can be changed to fit the dimension requirements of your website. For example, if you paste your embed code in a div that is 300px wide, the Peerby widget can be set to 300px wide. You can set the dimensions by using the width and height HTML attributes of the iframe.

Note: The minimum width of a timeline is 195px and the maximum is 500px. The minimum height is 300px.

Client Side Options

The options of the Peerby widget allow for the customization of the location of the Peerby requests. Both options can be customized in the URL attribute of the iframe HTML element.

  • locality - The city of which you would like to retrieve Peerby requests
  • country - The country of the locality in ISO-3166-1

More examples

Code

<iframe 
    allowtransparency="true"
    frameborder="0"
    height="500px"
    hspace="0"
    id="peerby_widget"
    marginheight="0"
    marginwidth="0"
    name="peerby_widget"
    src="http://widget.peerby.com/?country=nl&locality=amsterdam"
    vspace="0"
    width="300px">
</iframe>

Result

Code

<iframe 
    allowtransparency="true"
    frameborder="0"
    height="300px"
    hspace="0"
    id="peerby_widget"
    marginheight="0"
    marginwidth="0"
    name="peerby_widget"
    src="http://widget.peerby.com/?country=nl&locality=den%20haag"
    vspace="0"
    width="390px">
</iframe>

Result

More information

For more information please contact the Peerby developers at dev@peerby.com