Skip to Content
This is our docs site, visit our main website at strut.fit 
ComponentsSize Chart Button

Size Chart Button

Remember, the Assistant Manager must always be present for any StrutFit features to work.

The size chart button is a component that is placed on the product page. It is used to display a button that when clicked opens the size chart.

Integrating the Size Chart Button

Add the following script once per page where the size chart button should appear:

<script src="https://store-assistant-sizechartbutton.strut.fit" async></script>

Adding the Component

You can then place as many instances of the component as you need on the page (e.g. one per product). Only the script above needs to be included once.

<strutfit-size-chart-button product-code="{{ProductIdentifier}}"></strutfit-size-chart-button>

Replace {{ProductIdentifier}} with the unique product identifier you use for products in StrutFit.

Required Parameters

  • product-code: The unique product identifier you use for products in StrutFit.

Optional Parameters

  • id: Custom HTML id for the size chart button element.
  • product-name: Overrides the product name used in the app. By default, this uses the name set on the StrutFit dashboard.
  • product-image-url: Overrides the product image used in the app. By default, this uses the image set on the StrutFit dashboard.
  • variant: Sets the button variant style. Valid values are contained or outlined.
  • disabled: Set to true to disable button interaction.
  • full-width: Set to true to make the button fill the width of its container instead of sizing responsively to its text.
  • show-icon: Set to true or false to control icon visibility.
  • border-radius: Sets button border radius.
  • background-color: Sets button background color.
  • border: Sets the full CSS border value.
  • border-color: Sets the border color.
  • font-family: Sets button font family.
  • font-size: Sets button font size.
  • font-weight: Sets button font weight.
  • color: Sets text color.
  • icon-color: Sets icon color.
  • icon-size: Sets icon dimensions.
  • padding-top: Sets top padding.
  • padding-left: Sets left padding.
  • padding-bottom: Sets bottom padding.
  • padding-right: Sets right padding.
  • icon-text-gap: Sets the gap between the icon and the text.
  • margin: Sets shorthand margin.
  • margin-top: Sets top margin.
  • margin-left: Sets left margin.
  • margin-bottom: Sets bottom margin.
  • margin-right: Sets right margin.
  • text-transform: Sets text transform (e.g. uppercase, lowercase, capitalize).
  • line-height: Sets the line height. Defaults to 1.

Note: font-family will try to inherit your primary website font by default. If you change it, make sure that font is loaded on your website.

For a full list of options, see the Size Chart Button Options page.

Example With All Options

<strutfit-size-chart-button id="size-chart-button-123" product-code="{{ProductIdentifier}}" product-name="{{ProductTitle}}" product-image-url="{{ProductImage}}" variant="contained" disabled="false" full-width="true" show-icon="true" border-radius="8px" background-color="#fdc283" border="1px solid #d9a35f" border-color="#d9a35f" font-family="arial" font-size="14px" font-weight="700" color="#3d2a1a" icon-color="#3d2a1a" icon-size="12px" padding-top="8px" padding-left="16px" padding-bottom="8px" padding-right="16px" icon-text-gap="8px" margin="8px 0" margin-top="8px" margin-left="0" margin-bottom="8px" margin-right="0" text-transform="uppercase" line-height="1" ></strutfit-size-chart-button>
Last updated on