Add your own CSS and JavaScript to the storefront wishlist without editing the theme.
Where:Wishlist Settings → Custom CodeUse this page for small adjustments that settings cannot make: hiding an element, changing a font, moving a button on one template.
Your CSS is inserted into a <style id="cb-wishlist-custom-css"> tag on every page where the wishlist loads.
/* Round the product-page button and give it more space */.cb-wishlist-btn { border-radius: 999px !important; margin-top: 12px;}/* Hide the floating button on mobile */@media (max-width: 749px) { #cb-floating-wishlist { display: none !important; }}
The app injects its own styles after yours, so you may need !important to win.
Your script runs once per page, after the wishlist settings load, so window.widgetSettings is available. The wishlist builds parts of the page after that, so wait for the elements you need:
// Add a tracking call whenever a wishlist changesdocument.addEventListener('cb:wishlists-changed', function (e) { window.dataLayer = window.dataLayer || []; window.dataLayer.push({ event: 'wishlist_change', source: e.detail.source });});// Wait for the floating button before changing itnew MutationObserver(function (_, observer) { var btn = document.getElementById('cb-floating-wishlist'); if (btn) { btn.setAttribute('aria-label', 'Open my wishlist'); observer.disconnect(); }}).observe(document.body, { childList: true, subtree: true });
Custom JavaScript runs on your live storefront, outside any sandbox, and can read the logged-in customer’s details. Only paste code you trust, and test on a development theme first.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Codebeans Wishlyst","colors":{"primary":"#6C63D9","light":"#8B85E8","dark":"#5B52C9"},"logo":{"light":"https://mintcdn.com/codebeans-wishlyst/FOg6WqIIKdNxdSzd/logo/light.svg?fit=max\u0026auto=format\u0026n=FOg6WqIIKdNxdSzd\u0026q=85\u0026s=1d0698c7bcb062318a3f40bf894e2e2d","dark":"https://mintcdn.com/codebeans-wishlyst/FOg6WqIIKdNxdSzd/logo/dark.svg?fit=max\u0026auto=format\u0026n=FOg6WqIIKdNxdSzd\u0026q=85\u0026s=5fb7fd95b38d302f442ca1bc4c36fbd0"},"favicon":"https://mintcdn.com/codebeans-wishlyst/FOg6WqIIKdNxdSzd/favicon.png?fit=max\u0026auto=format\u0026n=FOg6WqIIKdNxdSzd\u0026q=85\u0026s=bd06a6c793093e4a2e05114e143e7f0c","api":{"playground":{"display":"interactive"},"examples":{"languages":["curl","javascript","python","swift","kotlin"]}},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"mailto:support@codebeans.net","label":"Support"}],"primary":{"type":"button","label":"Install app","href":"https://apps.shopify.com/shopy-wishlyst"}},"footer":{"socials":{"website":"https://codebeans.net"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Shopify App Store","icon":"shopify","href":"https://apps.shopify.com/shopy-wishlyst"},{"anchor":"Support","icon":"life-ring","href":"mailto:support@codebeans.net"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"codebeans-wishlyst","hasAudioNarration":false,"actualSubdomain":"codebeans-wishlyst","customDomains":[],"gitSource":{"type":"github","owner":"codebeans-shopify","repo":"shopy-wishlyst","deployBranch":"mintlify-doc","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ad1b4de6cda77c7b723b15d","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"API Reference","count":25},{"language":"default","tag":"Guides","count":25},{"language":"default","tag":"Customize","count":8},{"language":"default","tag":"Developers","count":7},{"language":"default","tag":"Sharing","count":6},{"language":"default","tag":"Wishlists","count":5},{"language":"default","tag":"Theme integration","count":5},{"language":"default","tag":"Emails","count":5},{"language":"default","tag":"Getting started","count":4},{"language":"default","tag":"Account","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","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":"llms-txt-v2","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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"developers/custom-code","slug":"/developers/custom-code","pageMetadata":{"title":"Custom CSS \u0026 JavaScript","description":"Add your own CSS and JavaScript to the storefront wishlist without editing the theme.","icon":"file-pen","href":"/developers/custom-code"},"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: \"Add your own CSS and JavaScript to the storefront wishlist without editing the theme.\"\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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Where:`}),` `,_jsx(_components.strong,{children:`Wishlist Settings → Custom Code`})]}),`\n`,_jsx(_components.p,{children:`Use this page for small adjustments that settings cannot make: hiding an element, changing a font, moving a button on one template.`}),`\n`,_jsx(Heading,{level:`2`,id:`custom-css`,children:`Custom CSS`}),`\n`,_jsxs(_components.p,{children:[`Your CSS is inserted into a `,_jsx(_components.code,{children:`\u003cstyle id=\"cb-wishlist-custom-css\">`}),` tag on every page where the wishlist loads.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`css`,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:`css`,children:_jsxs(_components.code,{language:`css`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* Round the product-page button and give it more space */`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D7BA7D`},children:`.cb-wishlist-btn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` border-radius`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`999`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#B5CEA8`},children:`px`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` !important`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` margin-top`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#B5CEA8`},children:`px`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* Hide the floating button on mobile */`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`@media`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`max-width`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`749`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#B5CEA8`},children:`px`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D7BA7D`},children:` #cb-floating-wishlist`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`display`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:`none`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` !important`}),_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`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`The app injects its own styles after yours, so you may need `,_jsx(_components.code,{children:`!important`}),` to win.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`custom-javascript`,children:`Custom JavaScript`}),`\n`,_jsxs(_components.p,{children:[`Your script runs once per page, after the wishlist settings load, so `,_jsx(_components.code,{children:`window.widgetSettings`}),` is available. The wishlist builds parts of the page after that, so wait for the elements you need:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,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:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Add a tracking call whenever a wishlist changes`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cb:wishlists-changed'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_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:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dataLayer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dataLayer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},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\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dataLayer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`push`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'wishlist_change'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`source:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`detail`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`source`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Wait for the floating button before changing it`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` MutationObserver`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`observer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` btn`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getElementById`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cb-floating-wishlist'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`btn`}),_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:` btn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setAttribute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'aria-label'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Open my wishlist'`}),_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:` observer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`disconnect`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`observe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`childList:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subtree:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/developers/javascript-api`,children:`JavaScript API \u0026 events`}),` for the events and functions you can use.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Custom JavaScript runs on your live storefront, outside any sandbox, and can read the logged-in customer’s details. Only paste code you trust, and test on a development theme first.`})}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Limits`}),`\n`,_jsx(_components.p,{children:`Each field holds up to 20,000 characters.`})]})}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 CSS \u0026 JavaScript","description":"Add your own CSS and JavaScript to the storefront wishlist without editing the theme.","icon":"file-pen","href":"/developers/custom-code"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Custom CSS","slug":"custom-css","depth":2,"children":[]},{"title":"Custom JavaScript","slug":"custom-javascript","depth":2,"children":[]},{"title":"Limits","slug":"limits","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"codebeans-wishlyst","siteName":"Codebeans Wishlyst","title":"Custom CSS \u0026 JavaScript - Codebeans Wishlyst","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-14T14:54:37.041Z","originalFileLocation":"developers/custom-code.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=\"system\"}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=\"Add your own CSS and JavaScript to the storefront wishlist without editing the theme.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Codebeans Wishlyst\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/codebeans-wishlyst/tnKRLiCE3xv8OUMe/_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=\"/mintlify-assets/_mintlify/favicons/codebeans-wishlyst/tnKRLiCE3xv8OUMe/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/codebeans-wishlyst/tnKRLiCE3xv8OUMe/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/codebeans-wishlyst/tnKRLiCE3xv8OUMe/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/codebeans-wishlyst/tnKRLiCE3xv8OUMe/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/codebeans-wishlyst/tnKRLiCE3xv8OUMe/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/codebeans-wishlyst/tnKRLiCE3xv8OUMe/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/codebeans-wishlyst/tnKRLiCE3xv8OUMe/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/codebeans-wishlyst/tnKRLiCE3xv8OUMe/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Custom CSS \u0026amp; JavaScript - Codebeans Wishlyst\">\u003cmeta data-mint-head property=\"og:description\" content=\"Add your own CSS and JavaScript to the storefront wishlist without editing the theme.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Codebeans Wishlyst\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://codebeans-wishlyst.mintlify.app/developers/custom-code\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://codebeans-wishlyst.mintlify.site/_mintlify/api/og/v2?division=Theme+integration\u0026amp;title=Custom+CSS+%26+JavaScript\u0026amp;description=Add+your+own+CSS+and+JavaScript+to+the+storefront+wishlist+without+editing+the+theme.\u0026amp;theme=fa435a77c1bcf8b47b8ce976\u0026amp;signature=c63ac886ba56c56b9afaa6355bfdeedc7dfdbc962804c9de8af94e3751eb0d65\">\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 CSS \u0026amp; JavaScript - Codebeans Wishlyst\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Add your own CSS and JavaScript to the storefront wishlist without editing the theme.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://codebeans-wishlyst.mintlify.site/_mintlify/api/og/v2?division=Theme+integration\u0026amp;title=Custom+CSS+%26+JavaScript\u0026amp;description=Add+your+own+CSS+and+JavaScript+to+the+storefront+wishlist+without+editing+the+theme.\u0026amp;theme=fa435a77c1bcf8b47b8ce976\u0026amp;signature=c63ac886ba56c56b9afaa6355bfdeedc7dfdbc962804c9de8af94e3751eb0d65\">\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=\"/mintlify-assets/_mintlify/favicons/codebeans-wishlyst/tnKRLiCE3xv8OUMe/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Codebeans Wishlyst\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6C63D9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://codebeans-wishlyst.mintlify.app/developers/custom-code\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/developers/custom-code.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://codebeans-wishlyst.mintlify.app/#organization\",\"name\":\"Codebeans Wishlyst\",\"url\":\"https://codebeans-wishlyst.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/codebeans-wishlyst/FOg6WqIIKdNxdSzd/logo/light.svg?fit=max\u0026auto=format\u0026n=FOg6WqIIKdNxdSzd\u0026q=85\u0026s=1d0698c7bcb062318a3f40bf894e2e2d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://codebeans-wishlyst.mintlify.app#website\",\"name\":\"Codebeans Wishlyst\",\"url\":\"https://codebeans-wishlyst.mintlify.app\",\"publisher\":{\"@id\":\"https://codebeans-wishlyst.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://codebeans-wishlyst.mintlify.app/developers/custom-code#webpage\",\"url\":\"https://codebeans-wishlyst.mintlify.app/developers/custom-code\",\"name\":\"Custom CSS \u0026 JavaScript\",\"description\":\"Add your own CSS and JavaScript to the storefront wishlist without editing the theme.\",\"dateModified\":\"2026-10-14T14:54:37.041Z\",\"isPartOf\":{\"@id\":\"https://codebeans-wishlyst.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://codebeans-wishlyst.mintlify.app/developers/custom-code#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://codebeans-wishlyst.mintlify.app/developers/custom-code#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Theme integration\",\"item\":\"https://codebeans-wishlyst.mintlify.app/developers/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom CSS \u0026 JavaScript\",\"item\":\"https://codebeans-wishlyst.mintlify.app/developers/custom-code\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://codebeans-wishlyst.mintlify.app/developers/custom-code#article\",\"headline\":\"Custom CSS \u0026 JavaScript\",\"name\":\"Custom CSS \u0026 JavaScript\",\"description\":\"Add your own CSS and JavaScript to the storefront wishlist without editing the theme.\",\"url\":\"https://codebeans-wishlyst.mintlify.app/developers/custom-code\",\"mainEntityOfPage\":{\"@id\":\"https://codebeans-wishlyst.mintlify.app/developers/custom-code#webpage\"},\"dateModified\":\"2026-10-14T14:54:37.041Z\",\"publisher\":{\"@id\":\"https://codebeans-wishlyst.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://codebeans-wishlyst.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Codebeans Wishlyst\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Codebeans Wishlyst\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/developers/custom-code.md","siteName":"Codebeans Wishlyst","nav":{"global":{"anchors":[{"anchor":"Shopify App Store","icon":"shopify","href":"https://apps.shopify.com/shopy-wishlyst"},{"anchor":"Support","icon":"life-ring","href":"mailto:support@codebeans.net"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Developers","groups":[{"group":"Theme integration","pages":[{"title":"Developer overview","icon":"code","href":"/developers/overview"},{"title":"Manual placement","icon":"hand-pointer","href":"/developers/manual-placement"},{"title":"JavaScript API \u0026 events","icon":"bolt","href":"/developers/javascript-api"},{"title":"Custom page templates","description":"Replace the wishlist page design with your own EJS markup, per market.","icon":"file-code","href":"/developers/page-templates"},{"title":"Custom CSS \u0026 JavaScript","icon":"file-pen","href":"/developers/custom-code"}]},{"group":"Integrations","pages":[{"title":"Shopify Flow","description":"Run Shopify Flow workflows when a shopper adds a product to a wishlist.","icon":"diagram-project","href":"/developers/shopify-flow"},{"title":"AI assistants (MCP)","icon":"robot","href":"/developers/mcp-server"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Custom CSS \u0026 JavaScript - Codebeans Wishlyst","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":[],"chunks":[]}