ArtSpaces / Integration / Overview

Integrating ArtSpaces widget to your website is quite easy.

It really just takes adding our JavaScript library to your website and then adding the HTML markup to where you want to display the button.

1- Adding JavaScript

You can add the above code to your footer, just before the closing "<body>" tag.

2- Adding HTML
- Attributes

Here is a list of the HTML attributes that you can include in your HTML markup to control the ArtSpaces widget.

artwork-url

string | required

The full url of your artwork image goes here between the quotation marks.

Ex: artwork-url="https://www.example.com/static/artwork.jpg"
space-id

string | required

This is where you specify the space you want to use. You can find the list of all available spaces and their IDs here.

Ex: space-id="0001"
unit

"cm" or "in" | optinal | defaults to "cm"

Measurement unit that will be displayed on the widget.

Ex: unit="cm"
initial-width

number | optional | defaults to 100 for cm and 36 for in

The initial width of the artwork on widget load. The height will be calculated automatically to respect the aspect ratio of your artwork.

- If you don't pass unit and do pass initial-width, it will be assumed that the value of initial-width is in in centimeters.

- If you pass unit="in", then whatever value you pass in initial-width will be assumed to be in inches.

- If you pass unit but don't pass initial-width, default values of 90 cm and 36" will be applied depending on which unit you passed.

Ex: initial-width="100"