Skip to content

Widget Attributes

In the widget overview, we explain how to use the widget on a product page through a custom HTML element. The attributes you provide during setup enable communication with Fitle’s APIs and help customize the user experience.

Custom Element Attributes

Below is a list of attributes you can use with the custom element.

clientId

type: string; required

This is the client identifier provided by us. It allows us to recognize you in our database.

<fitle-size-recommender ...
clientId="712" ...></fitle-size-recommender>

productId

type: string; required

This is the identifier for the product. It has to be the same provided with feeds and events.

<fitle-size-recommender ...
productId="12345A" ...></fitle-size-recommender>

availableSizes

type: string (sizes separated by commas); required

This attribute lists the available sizes for the product. Customers should be able to select any of these sizes on the product page.

<fitle-size-recommender ...
availableSizes="34,36,38,40" ...></fitle-size-recommender>

productImageUrl

type: string; required

This is the URL for the product’s image, which is displayed in the recommendation process. Relative paths are not supported, so make sure to provide the full URL.

<fitle-size-recommender ...
productImageUrl="https://example.com/tshirt.jpg" ...></fitle-size-recommender>

language

type: string; default: en (English)

This attribute sets the language for the widget. It can be automatically detected on your website; otherwise, it defaults to en (English).

<fitle-size-recommender ...
language="fr" ...></fitle-size-recommender>

braInputMandatory

type: boolean; default: false

This attribute makes the bra input field mandatory for women’s clothing.

<fitle-size-recommender ...
braInputMandatory ...></fitle-size-recommender>

debug

type: boolean; default: false

This attribute is for developers during implementation. When set to true, it enables logging in the console for debugging purposes.

<fitle-size-recommender ...
debug ...></fitle-size-recommender>

type: string

This attribute allows you to change the default appearance of the logo.

<fitle-size-recommender ...
logo="s" ...></fitle-size-recommender>
  • Default default logo
  • Small small logo

buttonText

type: string

This attribute changes the default text of the button.

<fitle-size-recommender ...
buttonText="Custom text" ...></fitle-size-recommender>
  • Default default text
  • Custom custom text

tooltipPosition

type: string

This attribute changes the default position of the tooltip if it is hidden due to the widget’s location.

<fitle-size-recommender ...
tooltipPosition="left" ...></fitle-size-recommender>
  • Default default tooltip position
  • Left tooltip position left

Guides