Use your own try-on button markup anywhere in your theme while keeping Genlook’s try-on widget, with one class and one JavaScript call.
Use your own button when the built-in one does not fit your design. Genlook still handles everything after the click: photo upload, generation, and the result screen.
Add your button
Place this anywhere on your product pages and style it however you like:
genlook-custom-button hides the button on products where try-on is off, so you can put it in a shared product template without conditions.
Genlook.cabin.open() opens the try-on widget for the current product.
It needs Genlook loaded on the page:
Shopify: the Genlook Try-On app embed must be on (see install). Skip the button block.
WooCommerce and PrestaShop: the plugin loads Genlook for you. Turn on Hide default button in Genlook → Widget design so shoppers do not see two buttons.
Keep the button visible by default. Genlook only ever hides it, so a button that starts at display: none never appears, and a display rule marked !important stops the hiding from working.
Open the widget from anywhere
Outside a product page, or to pick the product yourself, pass it to open():
If your code can run before Genlook finishes loading, wrap it in Genlook.ready():
Genlook.ready(() => { // Genlook.cabin is available});
Set widget design on one page
Widget colors and copy come from Widget Design in the Genlook app, and those settings always take priority. A page can still supply values for fields Widget Design leaves unset, with this tag:
<script type="application/json" id="genlook-cabin-config"> { "theme": { "color": "#0A1810" }, "copy": { "title": "Try it on", "subtitle": "", "uploadInfo": "A full-body photo works best" } }</script>
Field
What it does
theme.color
Accent color of the widget buttons and loaders.
copy.title, copy.subtitle
Widget header. Empty uses the default.
copy.uploadInfo
Hint above the upload buttons. Empty hides it.
showRemainingTryOns
Show how many try-ons the shopper has left.
gender
"default", "male", or "female", for languages with gendered grammar.
This tag is a fallback, not an override:
Saving Widget Design stores the header, subtitle, upload hint, remaining try-ons and grammar gender, empty fields included. After that, the tag can only set theme.color, and only while Widget Design has no accent color.
Genlook reads only the first genlook-cabin-config tag on the page. The Try-On button block writes its own, so on a page with the block, your tag is used only if it comes before the block.
The JSON must be valid. A trailing comma is enough for Genlook to ignore the whole tag.
Going further
To replace the widget itself with your own interface, use the JavaScript SDK.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Genlook Documentation","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/genloook/E-Zz0RUPElap0z-g/logo/light.png?fit=max\u0026auto=format\u0026n=E-Zz0RUPElap0z-g\u0026q=85\u0026s=b5850569f68556b7bcb48ae2d787deb2","dark":"https://mintcdn.com/genloook/E-Zz0RUPElap0z-g/logo/dark.png?fit=max\u0026auto=format\u0026n=E-Zz0RUPElap0z-g\u0026q=85\u0026s=22e6b558c8da304bc089c41f8dc6b33e"},"favicon":"https://mintcdn.com/genloook/7t2z58UuD_DLkyk0/favicon.svg?fit=max\u0026auto=format\u0026n=7t2z58UuD_DLkyk0\u0026q=85\u0026s=cd91e0c41ca457854f75a26a8db797ed","appearance":{"default":"light"},"navbar":{"links":[{"href":"https://discord.gg/gP9HsRUcvH","label":"Discord"},{"href":"mailto:support@genlook.app","label":"Support"}],"primary":{"type":"button","label":"Get Started","href":"https://genlook.app/get-started?utm_source=docs\u0026utm_medium=website"}},"footer":{"socials":{"x":"https://x.com/genlook_app","github":"https://github.com/genlookLabs","linkedin":"https://linkedin.com/company/genlook-virtual-try-on","youtube":"https://www.youtube.com/@genlookai","instagram":"https://www.instagram.com/genlook.app"},"links":[{"header":"Legal","items":[{"label":"Terms of Service","href":"https://genlook.app/terms"},{"label":"Privacy Policy","href":"https://genlook.app/privacy"},{"label":"Legal notice","href":"https://genlook.app/legal-notice"}]}]},"seo":{"metatags":{"canonical":"https://genlook.app/docs"}},"integrations":{"ga4":{"measurementId":"G-B46804SDQ5"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://genlook.app?utm_source=docs\u0026utm_medium=website"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"genloook","hasAudioNarration":false,"actualSubdomain":"genloook","customDomains":["docs.genlook.app"],"gitSource":{"type":"github","owner":"thibaultmthh","repo":"genlook","deployBranch":"main","contentDirectory":"apps/docs-v2","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6af8367b642a716c8d88d8f4","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"Virtual Try-On App","count":29},{"language":"default","tag":"Virtual Try-On API","count":26},{"language":"default","tag":"Developers","count":11},{"language":"default","tag":"Get Started","count":10},{"language":"default","tag":"Storefront API reference","count":8},{"language":"default","tag":"Guides","count":7},{"language":"default","tag":"Grow","count":7},{"language":"default","tag":"Try-On","count":4},{"language":"default","tag":"Configure","count":4},{"language":"default","tag":"Batches","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"virtual-tryon/custom-button","slug":"/virtual-tryon/custom-button","pageMetadata":{"title":"Custom Button","description":"Use your own try-on button markup anywhere in your theme while keeping Genlook's try-on widget, with one class and one JavaScript call.","href":"/virtual-tryon/custom-button"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use your own try-on button markup anywhere in your theme while keeping Genlook’s try-on widget, with one class and one JavaScript call.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Use your own button when the built-in one does not fit your design. Genlook still handles everything after the click: photo upload, generation, and the result screen.`}),`\n`,_jsx(Heading,{level:`2`,id:`add-your-button`,children:`Add your button`}),`\n`,_jsx(_components.p,{children:`Place this anywhere on your product pages and style it however you like:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"button\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` class`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"genlook-custom-button\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onclick`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Genlook`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cabin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`open`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`()\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Virtual Try-On`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`That is the whole integration:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`genlook-custom-button`})}),` hides the button on products where try-on is off, so you can put it in a shared product template without conditions.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`Genlook.cabin.open()`})}),` opens the try-on widget for the current product.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`It needs Genlook loaded on the page:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Shopify`}),`: the `,_jsx(_components.strong,{children:`Genlook Try-On`}),` app embed must be on (see `,_jsx(_components.a,{href:`/virtual-tryon/install/shopify`,children:`install`}),`). Skip the button block.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`WooCommerce and PrestaShop`}),`: the plugin loads Genlook for you. Turn on `,_jsx(_components.strong,{children:`Hide default button`}),` in `,_jsx(_components.strong,{children:`Genlook → Widget design`}),` so shoppers do not see two buttons.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Keep the button visible by default. Genlook only ever hides it, so a button that starts at `,_jsx(_components.code,{children:`display: none`}),` never appears, and a `,_jsx(_components.code,{children:`display`}),` rule marked `,_jsx(_components.code,{children:`!important`}),` stops the hiding from working.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`open-the-widget-from-anywhere`,children:`Open the widget from anywhere`}),`\n`,_jsxs(_components.p,{children:[`Outside a product page, or to pick the product yourself, pass it to `,_jsx(_components.code,{children:`open()`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Genlook`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cabin`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"123456789\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` title:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Classic T-Shirt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"/products/classic-t-shirt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` featured_image:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://cdn.shopify.com/...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`If your code can run before Genlook finishes loading, wrap it in `,_jsx(_components.code,{children:`Genlook.ready()`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Genlook`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ready`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Genlook.cabin is available`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`set-widget-design-on-one-page`,children:`Set widget design on one page`}),`\n`,_jsxs(_components.p,{children:[`Widget colors and copy come from `,_jsx(_components.strong,{children:`Widget Design`}),` in the Genlook app, and those settings always take priority. A page can still supply values for fields Widget Design leaves unset, with this tag:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"genlook-cabin-config\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"theme\": { \"color\": \"#0A1810\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"copy\": { \"title\": \"Try it on\", \"subtitle\": \"\", \"uploadInfo\": \"A full-body photo works best\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`What it does`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`theme.color`})}),_jsx(_components.td,{children:`Accent color of the widget buttons and loaders.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`copy.title`}),`, `,_jsx(_components.code,{children:`copy.subtitle`})]}),_jsx(_components.td,{children:`Widget header. Empty uses the default.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`copy.uploadInfo`})}),_jsx(_components.td,{children:`Hint above the upload buttons. Empty hides it.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`showRemainingTryOns`})}),_jsx(_components.td,{children:`Show how many try-ons the shopper has left.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`gender`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`\"default\"`}),`, `,_jsx(_components.code,{children:`\"male\"`}),`, or `,_jsx(_components.code,{children:`\"female\"`}),`, for languages with gendered grammar.`]})]})]})]}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:`This tag is a fallback, not an override:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Saving `,_jsx(_components.strong,{children:`Widget Design`}),` stores the header, subtitle, upload hint, remaining try-ons and grammar gender, empty fields included. After that, the tag can only set `,_jsx(_components.code,{children:`theme.color`}),`, and only while Widget Design has no accent color.`]}),`\n`,_jsxs(_components.li,{children:[`Genlook reads only the first `,_jsx(_components.code,{children:`genlook-cabin-config`}),` tag on the page. The Try-On button block writes its own, so on a page with the block, your tag is used only if it comes before the block.`]}),`\n`]})]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`The JSON must be valid. A trailing comma is enough for Genlook to ignore the whole tag.`})}),`\n`,_jsx(Heading,{level:`2`,id:`going-further`,children:`Going further`}),`\n`,_jsxs(_components.p,{children:[`To replace the widget itself with your own interface, use the `,_jsx(_components.a,{href:`/virtual-tryon/sdk`,children:`JavaScript SDK`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Custom Button","description":"Use your own try-on button markup anywhere in your theme while keeping Genlook's try-on widget, with one class and one JavaScript call.","href":"/virtual-tryon/custom-button"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Add your button","slug":"add-your-button","depth":2,"children":[]},{"title":"Open the widget from anywhere","slug":"open-the-widget-from-anywhere","depth":2,"children":[]},{"title":"Set widget design on one page","slug":"set-widget-design-on-one-page","depth":2,"children":[]},{"title":"Going further","slug":"going-further","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"genloook","siteName":"Genlook Documentation","title":"Custom Button - Genlook Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-22T11:38:42.093Z","originalFileLocation":"virtual-tryon/custom-button.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use your own try-on button markup anywhere in your theme while keeping Genlook\u0026#x27;s try-on widget, with one class and one JavaScript call.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Genlook Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Custom Button - Genlook Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use your own try-on button markup anywhere in your theme while keeping Genlook\u0026#x27;s try-on widget, with one class and one JavaScript call.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Genlook Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://genlook.app/docs/virtual-tryon/custom-button\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://genloook.mintlify.site/docs/_mintlify/api/og/v2?division=Developers\u0026amp;title=Custom+Button\u0026amp;description=Use+your+own+try-on+button+markup+anywhere+in+your+theme+while+keeping+Genlook%27s+try-on+widget%2C+with+one+class+and+one+JavaScript+call.\u0026amp;theme=f28d07354cc3228d02af9b71\u0026amp;signature=7773f8f50d75cce3063d4c4ccc793b0460e78ae8d0c663b12dfa90e8510e8f47\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Custom Button - Genlook Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use your own try-on button markup anywhere in your theme while keeping Genlook\u0026#x27;s try-on widget, with one class and one JavaScript call.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://genloook.mintlify.site/docs/_mintlify/api/og/v2?division=Developers\u0026amp;title=Custom+Button\u0026amp;description=Use+your+own+try-on+button+markup+anywhere+in+your+theme+while+keeping+Genlook%27s+try-on+widget%2C+with+one+class+and+one+JavaScript+call.\u0026amp;theme=f28d07354cc3228d02af9b71\u0026amp;signature=7773f8f50d75cce3063d4c4ccc793b0460e78ae8d0c663b12dfa90e8510e8f47\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Genlook Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://genlook.app/docs/virtual-tryon/custom-button\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/virtual-tryon/custom-button.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://genlook.app/#organization\",\"name\":\"Genlook Documentation\",\"url\":\"https://genlook.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/genloook/E-Zz0RUPElap0z-g/logo/light.png?fit=max\u0026auto=format\u0026n=E-Zz0RUPElap0z-g\u0026q=85\u0026s=b5850569f68556b7bcb48ae2d787deb2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://genlook.app/docs#website\",\"name\":\"Genlook Documentation\",\"url\":\"https://genlook.app/docs\",\"publisher\":{\"@id\":\"https://genlook.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://genlook.app/docs/virtual-tryon/custom-button#webpage\",\"url\":\"https://genlook.app/docs/virtual-tryon/custom-button\",\"name\":\"Custom Button\",\"description\":\"Use your own try-on button markup anywhere in your theme while keeping Genlook's try-on widget, with one class and one JavaScript call.\",\"dateModified\":\"2026-10-22T11:38:42.093Z\",\"isPartOf\":{\"@id\":\"https://genlook.app/docs#website\"},\"breadcrumb\":{\"@id\":\"https://genlook.app/docs/virtual-tryon/custom-button#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://genlook.app/docs/virtual-tryon/custom-button#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Genlook Documentation\",\"item\":\"https://genlook.app/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom Button\",\"item\":\"https://genlook.app/docs/virtual-tryon/custom-button\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://genlook.app/docs/virtual-tryon/custom-button#article\",\"headline\":\"Custom Button\",\"name\":\"Custom Button\",\"description\":\"Use your own try-on button markup anywhere in your theme while keeping Genlook's try-on widget, with one class and one JavaScript call.\",\"url\":\"https://genlook.app/docs/virtual-tryon/custom-button\",\"mainEntityOfPage\":{\"@id\":\"https://genlook.app/docs/virtual-tryon/custom-button#webpage\"},\"dateModified\":\"2026-10-22T11:38:42.093Z\",\"publisher\":{\"@id\":\"https://genlook.app/#organization\"},\"isPartOf\":{\"@id\":\"https://genlook.app/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Genlook Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Genlook Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/virtual-tryon/custom-button.md","siteName":"Genlook Documentation","nav":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://genlook.app?utm_source=docs\u0026utm_medium=website"}]},"tabs":[{"tab":"Home","pages":[{"title":"Home","href":""}]},{"tab":"Virtual Try-On App","groups":[{"group":"Get Started","pages":[{"title":"Genlook Virtual Try-On","sidebarTitle":"Introduction","href":"/virtual-tryon/introduction"},{"title":"Install on Shopify","href":"/virtual-tryon/install/shopify"},{"title":"Shopify Canvas themes","href":"/virtual-tryon/install/shopify-canvas"},{"title":"Install on WooCommerce / WordPress","sidebarTitle":"Install on WooCommerce","href":"/virtual-tryon/install/woocommerce"},{"title":"Install on PrestaShop","href":"/virtual-tryon/install/prestashop"}]},{"group":"Configure","pages":[{"title":"Choose Which Products Offer Try-On","sidebarTitle":"Choose products","href":"/virtual-tryon/app/product-visibility"},{"title":"Design the Button and Widget","sidebarTitle":"Button \u0026 widget design","href":"/virtual-tryon/app/widget-design"},{"title":"Try-On Settings","sidebarTitle":"Settings","href":"/virtual-tryon/app/tryon-settings"},{"title":"Plans, Billing \u0026 Usage","sidebarTitle":"Plans \u0026 billing","href":"/virtual-tryon/app/billing"}]},{"group":"Grow","pages":[{"title":"Analytics \u0026 Attribution","sidebarTitle":"Analytics","href":"/virtual-tryon/app/analytics"},{"title":"Integrations","sidebarTitle":"Integrations overview","href":"/virtual-tryon/integrations/introduction"},{"title":"Shopify Flow","href":"/virtual-tryon/integrations/shopify-flow"},{"title":"Klaviyo","href":"/virtual-tryon/integrations/klaviyo"},{"title":"Webhooks","href":"/virtual-tryon/integrations/webhooks"},{"title":"In-Store Try-On with QR Codes","sidebarTitle":"In-store QR codes","href":"/virtual-tryon/retail"},{"title":"Live Try-On (Beta)","description":"Real-time camera virtual try-on for your product pages: shoppers see the garment on themselves live in the camera, no photo upload needed.","href":"/virtual-tryon/app/live-tryon"}]},{"group":"Developers","pages":[{"title":"Custom Button","href":"/virtual-tryon/custom-button"},{"title":"JavaScript SDK","description":"Build virtual try-on into any app with the @genlook/storefront SDK: custom UIs, native apps, headless storefronts. Uploads, generation, quotas, events, and errors handled for you.","href":"/virtual-tryon/sdk"},{"title":"Direct API Access","href":"/virtual-tryon/direct-api-access"},{"group":"Storefront API reference","pages":[{"title":"Upload Image","api":"POST /storefront/v1/uploads","href":"/virtual-tryon/endpoints/upload-image"},{"title":"Create Try-On","api":"POST /storefront/v1/try-ons","href":"/virtual-tryon/endpoints/create-try-on"},{"title":"Try-On Status","api":"GET /storefront/v1/try-ons/{id}","href":"/virtual-tryon/endpoints/try-on-status"},{"title":"Availability","api":"GET /storefront/v1/availability","href":"/virtual-tryon/endpoints/availability"},{"title":"Collect Email","api":"POST /storefront/v1/shopper/email","href":"/virtual-tryon/endpoints/collect-email"},{"title":"Share Try-On","api":"POST /storefront/v1/try-ons/{id}/share","href":"/virtual-tryon/endpoints/share-try-on"},{"title":"Delete My Data","api":"DELETE /storefront/v1/shopper","href":"/virtual-tryon/endpoints/delete-my-data"},{"title":"Events","api":"POST /storefront/v1/events","href":"/virtual-tryon/endpoints/events"}]}]},{"group":"Help","pages":[{"title":"Troubleshooting","href":"/virtual-tryon/troubleshooting"},{"title":"Frequently Asked Questions","sidebarTitle":"FAQ","href":"/virtual-tryon/faq"}]}]},{"tab":"Virtual Try-On API","pages":[{"title":"Virtual Try-On API","href":"/tryon-api/introduction"}]}]},"basePath":"","title":"Custom Button - Genlook Documentation","buildId":"dpl_eBQnj73Q1gDRVNqNsS3Yt9yPkTEW","deploymentId":"dpl_eBQnj73Q1gDRVNqNsS3Yt9yPkTEW","dynamics":[],"chunks":[]}