Home > widget-integration > InstantSearchController > getShopSpecificStyles

InstantSearchController.getShopSpecificStyles() method

Get shop-specific CSS custom properties to inject into the widget container.

Override to provide per-shop theming without touching global CSS. The returned object is applied via container.style.setProperty(), so keys must be valid CSS custom property names (e.g. --boost-isw-max-width).

Signature:

protected getShopSpecificStyles(): Record<string, string>;

Returns:

Record<string, string>

Record mapping CSS custom property names to values (empty by default)

Example

window.boostWidgetIntegration.extend('InstantSearchController', (InstantSearchController) => {
  return class CustomController extends InstantSearchController {
    protected getShopSpecificStyles() {
      return {
        '--boost-isw-max-width': '640px',
        '--boost-isw-border-radius': '12px',
      };
    }
  };
});