Choose this approach if you want complete control over the try-on button’s design and placement, but still want Genlook’s pre-built widget to handle photo uploads, generation, and result display. There are two ways to set this up, depending on how much control you need.Documentation Index
Fetch the complete documentation index at: https://docs.genlook.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
- Method 2: Global Block + Liquid Snippet
Where the widget reads its settings
The widget gets its appearance and behavior from two layers, and the per-page tag wins for any field it explicitly sets:-
Widget Design tab (Genlook admin → Widget Design). Store-wide settings — color, copy, grammar gender, etc. Saved to a shop metafield and auto-rendered on every product page by the Genlook Try-On app embed as
<script id="genlook-cabin-config-internal">. Most merchants only need this. -
genlook-cabin-configscript tag (per page). Overrides individual fields for the page it’s rendered on. Method 1 above generates this automatically from the block’s Theme Editor settings; Method 2 has you write it by hand.
The merge is per-field. A per-page
theme.color overrides only the color and leaves dashboard copy/gender/etc. untouched. To “use the dashboard value”, just omit the field from genlook-cabin-config.When to use which
- No customization needed → install the app, add a button block, done. The widget inherits the button’s primary color out of the box.
- Brand the widget once across the whole store → set values in the Widget Design tab. No code.
- Override on a specific product or template → emit
genlook-cabin-configon that page with only the fields you want to override.
genlook-cabin-config Reference
The genlook-cabin-config script tag is a JSON object that the SDK reads on initialization. When using Method 1, the Genlook Widget block generates this automatically from the Theme Editor settings. When using Method 2, you provide it manually. Every field shown below is also configurable through the Widget Design tab in the merchant dashboard — values you put here win for the current page.
Options
Eagerly load the widget JavaScript in the background when the page loads. When
true, the first open() call is
near-instant. When false or omitted, the widget JS is loaded on-demand when open() is first called - still fully
functional, just slightly slower on first open.Display a counter inside the widget showing how many try-on generations the visitor has left for the current period
(daily or weekly).
Grammatical gender for languages like Hebrew and Arabic that have gendered grammar. Accepted values:
"default",
"male", "female".Visual theming for the widget modal.
Override the default text shown inside the widget.
Setting
preload to false does not disable the widget. You can always call Genlook.cabin.open() regardless of
the preload setting - the SDK will lazy-load the widget automatically.SDK Reference
Genlook.cabin.preload
Type: boolean
Indicates whether the widget JS was eagerly loaded on page initialization. This reflects the preload value from the genlook-cabin-config JSON.
Genlook.cabin.open()
Opens the try-on widget modal. If the widget JS hasn’t been loaded yet, it is automatically fetched, and the modal opens as soon as it’s ready.
Genlook.cabin.fetch(url, options)
Performs an authenticated fetch request through the Shopify app proxy. Use this helper for all endpoint calls if you need to make direct API requests without handling the proxy path yourself.
/apps/proxy_genlook-x/public) is prepended automatically.
Next Steps
- Want to abandon the pre-built modal and build a completely custom UI? See the Full Custom Flow.


