{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Extension.js","description":"Build browser extensions for Chrome, Edge, Firefox, and Safari with one modern workflow. Extension.js handles manifest compilation, browser-specific output, reload behavior, and packaging so you can focus on product features.","colors":{"primary":"#0065e6","light":"#60a5fa","dark":"#0065e6"},"logo":{"light":"https://mintcdn.com/extensionjs/OSsaYW6REekgcRaD/logo-light.png?fit=max\u0026auto=format\u0026n=OSsaYW6REekgcRaD\u0026q=85\u0026s=0eebd66d9a894dd11e16686f9ef4a875","dark":"https://mintcdn.com/extensionjs/OSsaYW6REekgcRaD/logo-dark.png?fit=max\u0026auto=format\u0026n=OSsaYW6REekgcRaD\u0026q=85\u0026s=5cf23e76dbd27b25aef263d7b407fea5"},"favicon":"https://mintcdn.com/extensionjs/OSsaYW6REekgcRaD/favicon.png?fit=max\u0026auto=format\u0026n=OSsaYW6REekgcRaD\u0026q=85\u0026s=19a6b751f0b381529fdb96230bbc2c94","appearance":{"default":"dark"},"navbar":{"links":[{"icon":"github","href":"https://github.com/extension-js/extension.js","label":"GitHub"},{"icon":"npm","href":"https://www.npmjs.com/package/extension","label":"npm"},{"icon":"robot","href":"https://www.extension.dev/mcp?utm_source=extension-js-org\u0026utm_medium=sponsor\u0026utm_campaign=navbar-ai-agents","label":"AI agents"},{"icon":"store","href":"https://docs.extension.dev/publish/overview?utm_source=extension-js-org\u0026utm_medium=sponsor\u0026utm_campaign=navbar-publish","label":"Publish to stores"}]},"footer":{"socials":{"github":"https://github.com/extension-js/extension.js","discord":"https://discord.gg/BRqbPDfPxb","x":"https://twitter.com/extensionjs"},"links":[{"header":"Project","items":[{"label":"Pledge","href":"/docs/pledge"},{"label":"Roadmap","href":"/docs/roadmap"}]}]},"seo":{"metatags":{"og:site_name":"Extension.js","og:image":"https://media.extension.land/brand/extension-js/social/og.png","og:image:type":"image/png","og:image:alt":"Extension.js, the cross-browser extension framework","twitter:site":"@extensionjs","twitter:creator":"@extensionjs","twitter:card":"summary_large_image","twitter:image":"https://media.extension.land/brand/extension-js/social/og.png","twitter:image:alt":"Extension.js, the cross-browser extension framework","google-site-verification":"BLSk7tcWG_qVtuAAf4UJyUbPIGXfghiJcUaDP4aoGpM","msvalidate.01":"E718A8AA0D4E3ED605BFF1BA1C0E46A7","yandex-verification":"e2a6f3f5424c1722"},"indexing":"all"},"integrations":{"gtm":{"tagId":"GTM-NJD6VVD4"},"posthog":{"apiKey":"phc_Np5x3Jg3h2V7kTFtNch2uz6QBaWDycQpIidzX5PetaN"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","cursor","vscode","mcp","add-mcp"],"display":"header"},"markdown":{"instructions":["Extension.js needs Node.js 22.12 or newer; Node.js 18 and 20 do not work. It also runs on Deno 2.5+ and Bun 1.2+.","The default browser target is chromium and a build lands in dist/\u003cbrowser>, so dist/chromium by default. extension build writes a zip only when --zip is passed.","Prefix a manifest key with a browser name when browsers differ. chromium: covers every Chromium-family target and Safari builds read it too. Since 4.1.19 chrome: means Chrome alone and edge: means Edge alone.","Write one background.service_worker in manifest.json instead of hand-writing per-browser background keys; Extension.js converts it for each browser.","package.json or deno.json marks the project root, not manifest.json. A config file is optional, and only extension.config.js, .mjs and .cjs are loaded, never .ts.","The bundler is Rspack, extended through the config hook in extension.config.js. A project needs no separate bundler config file.","Use --no-browser to skip the browser launch; --no-runner no longer exists and --no-open still launches the browser. Use --output for machine output; --format and --wait-format are deprecated."]},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":""},{"language":"zh-Hans","href":"zh-Hans"},{"language":"zh-Hant","href":"zh-Hant"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"extensionjs","hasAudioNarration":false,"actualSubdomain":"extensionjs","customDomains":["extension.js.org"],"gitSource":{"type":"github","owner":"extension-js","repo":"extension.js.org","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0a078897c125ca7f833809","clientVersion":"0.0.4342","searchFilterCounts":[{"language":"en","tag":"Documentation","count":144},{"language":"zh-Hans","tag":"Documentation","count":144},{"language":"zh-Hant","tag":"Documentation","count":144},{"language":"en","tag":"Implementation guide","count":26},{"language":"zh-Hans","tag":"Implementation guide","count":26},{"language":"zh-Hant","tag":"Implementation guide","count":26},{"language":"en","tag":"Workflows","count":17},{"language":"zh-Hans","tag":"Workflows","count":17},{"language":"zh-Hant","tag":"Workflows","count":17},{"language":"en","tag":"Commands reference","count":16},{"language":"zh-Hans","tag":"Commands reference","count":16},{"language":"zh-Hant","tag":"Commands reference","count":16},{"language":"en","tag":"Languages and frameworks","count":15},{"language":"zh-Hans","tag":"Languages and frameworks","count":15},{"language":"zh-Hant","tag":"Languages and frameworks","count":15},{"language":"en","tag":"Features","count":13},{"language":"zh-Hans","tag":"Features","count":13},{"language":"zh-Hant","tag":"Features","count":13},{"language":"en","tag":"Integrations","count":12},{"language":"zh-Hans","tag":"Integrations","count":12},{"language":"zh-Hant","tag":"Integrations","count":12},{"language":"en","tag":"Compare and migrate","count":9},{"language":"zh-Hans","tag":"Compare and migrate","count":9},{"language":"zh-Hant","tag":"Compare and migrate","count":9},{"language":"en","tag":"Browsers","count":8},{"language":"zh-Hans","tag":"Browsers","count":8},{"language":"zh-Hant","tag":"Browsers","count":8},{"language":"en","tag":"Blog","count":7},{"language":"zh-Hans","tag":"Blog","count":7},{"language":"zh-Hant","tag":"Blog","count":7}]},"assistantConfig":{"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"deflection":{"enabled":true,"email":"hello@extension.dev"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"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":"site-roles","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":"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":"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":"turbopuffer-dual-write","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":"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":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[{"_id":"69e8bb9382f38263e5089464","deploymentId":"6648a29700dd75f3275ec70a","questionText":"Does Extension.js support Svelte?","status":"active","generatedBy":"manual","createdAt":"2026-04-22T12:14:11.430Z","updatedAt":"2026-04-22T12:14:11.430Z","__v":0},{"_id":"69e8bb7d82f38263e50893d7","deploymentId":"6648a29700dd75f3275ec70a","questionText":"How can I migrate my existing extension to Extension.js?","status":"active","generatedBy":"manual","createdAt":"2026-04-22T12:13:49.264Z","updatedAt":"2026-04-22T12:13:49.264Z","__v":0},{"_id":"69e8bb3d82f38263e50892a6","deploymentId":"6648a29700dd75f3275ec70a","questionText":"How can I create a browser extension with Extension.js?","status":"active","generatedBy":"manual","createdAt":"2026-04-22T12:12:45.272Z","updatedAt":"2026-04-22T12:12:45.272Z","__v":0}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".ext-hero-cmd{display:inline-flex;align-items:center;gap:0.75rem;width:100%;max-width:36rem;padding:0.875rem 1rem 0.875rem 1.25rem;border-radius:0.75rem;background:rgba(15, 23, 42, 0.65);border:1px solid rgba(255, 255, 255, 0.12);font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;font-size:1rem;text-align:left;box-shadow:0 1px 0 rgba(255, 255, 255, 0.04) inset,\n 0 6px 24px rgba(0, 0, 0, 0.18)}:root:not(.dark) .ext-hero-cmd{background:rgba(15, 23, 42, 0.04);border-color:rgba(15, 23, 42, 0.12);box-shadow:0 1px 0 rgba(255, 255, 255, 0.6) inset,\n 0 6px 24px rgba(15, 23, 42, 0.06);color:#0f172a}.ext-hero-cmd-prompt{color:#0065e6;font-weight:600;user-select:none}.ext-hero-cmd-code{flex:1;background:transparent!important;padding:0!important;color:inherit;white-space:nowrap;overflow-x:auto;font-size:1rem}.ext-hero-cmd-copy{flex:0 0 auto;padding:0.375rem 0.75rem;border-radius:0.5rem;border:1px solid rgba(255, 255, 255, 0.15);background:rgba(255, 255, 255, 0.04);color:inherit;font-size:0.8125rem;font-family:inherit;cursor:pointer;transition:background 0.15s ease,\n border-color 0.15s ease}.ext-hero-cmd-copy:hover{background:rgba(255, 255, 255, 0.08);border-color:rgba(255, 255, 255, 0.25)}:root:not(.dark) .ext-hero-cmd-copy{border-color:rgba(15, 23, 42, 0.22);background:rgba(15, 23, 42, 0.03);color:#334155}:root:not(.dark) .ext-hero-cmd-copy:hover{background:rgba(15, 23, 42, 0.07);border-color:rgba(15, 23, 42, 0.32)}.ext-hero-badges{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:0.5rem;margin-top:-0.25rem}.ext-hero-badges a{display:inline-flex;text-decoration:none}.ext-hero-badges img{height:22px;display:block}.ext-sponsors{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3rem;width:100%;max-width:32rem;margin:2rem auto 0}.ext-sponsor-tile{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:100%;height:72px;opacity:0.85;transition:opacity 0.15s ease}.ext-sponsor-tile:hover{opacity:1}.ext-sponsor-logo{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}.ext-sponsor-logo-circle{border-radius:50%;height:100%;width:auto}.ext-sponsor-logo-maro{max-height:40px;color:#1a1a1a}.ext-migrate-callout{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:1.5rem;padding:2rem 2.5rem;border-radius:1.25rem;border:1px solid rgba(14, 98, 247, 0.25);background:linear-gradient(\n 135deg,\n rgba(14, 98, 247, 0.08) 0%,\n rgba(14, 98, 247, 0.02) 100%\n )}@media (min-width: 768px){.ext-migrate-callout{flex-direction:row;align-items:center}}.ext-migrate-actions{display:flex;flex-wrap:wrap;gap:0.75rem;flex-shrink:0}.ext-migrate-btn{display:inline-flex;align-items:center;padding:0.625rem 1rem;border-radius:0.625rem;border:1px solid rgba(14, 98, 247, 0.4);background:rgba(14, 98, 247, 0.05);color:#0065e6!important;font-weight:500;font-size:0.9375rem;text-decoration:none!important;transition:background 0.15s ease,\n border-color 0.15s ease;white-space:nowrap}.ext-migrate-btn:hover{background:rgba(14, 98, 247, 0.12);border-color:rgba(14, 98, 247, 0.6)}.ext-hero-dock-wrap{display:flex;flex-direction:column;align-items:center;gap:0.625rem;margin-top:0.5rem}.ext-hero-dock-label{font-size:0.75rem;letter-spacing:0.08em;text-transform:uppercase;color:rgb(100, 116, 139);margin:0}.ext-dock-compact .ext-dock-row{gap:0.875rem}.ext-dock-compact .ext-dock-tile{width:36px;height:36px;padding:6px}.ext-codepreview{display:grid;grid-template-columns:1fr;gap:2rem;align-items:center;padding:2.25rem;border-radius:1.25rem;background:linear-gradient(\n 180deg,\n rgba(255, 255, 255, 0.02),\n rgba(255, 255, 255, 0.005)\n );border:1px solid rgba(255, 255, 255, 0.08)}@media (min-width: 1024px){.ext-codepreview{grid-template-columns:1fr 1.4fr;gap:3rem;padding:3rem}}.ext-codepreview-text code{background:rgba(14, 98, 247, 0.08);color:#0065e6;padding:0.05em 0.4em;border-radius:0.3rem;font-size:0.95em}.ext-codepreview-code{background:rgba(15, 23, 42, 0.7)!important;color:#e2e8f0!important;padding:1.25rem 1.5rem!important;border-radius:0.75rem;border:1px solid rgba(255, 255, 255, 0.08);overflow-x:auto;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;font-size:0.875rem;line-height:1.7;margin:0}.ext-cp-punc{color:#94a3b8}.ext-cp-key{color:#93c5fd}.ext-cp-str{color:#86efac}.ext-cp-num{color:#fbbf24}.ext-cp-prefix{color:#f0abfc;font-weight:600}:root:not(.dark) .ext-codepreview{background:linear-gradient(\n 180deg,\n rgba(15, 23, 42, 0.02),\n rgba(15, 23, 42, 0.005)\n );border-color:rgba(15, 23, 42, 0.08)}:root:not(.dark) .ext-codepreview-code{background:#f1f5f9!important;color:#0f172a!important;border-color:rgba(15, 23, 42, 0.1)}:root:not(.dark) .ext-cp-punc{color:#475569}:root:not(.dark) .ext-cp-key{color:#1d4ed8}:root:not(.dark) .ext-cp-str{color:#15803d}:root:not(.dark) .ext-cp-num{color:#9a3412}:root:not(.dark) .ext-cp-prefix{color:#a21caf}.ext-feature-grid{display:grid;grid-template-columns:1fr;gap:1rem}@media (min-width: 1024px){.ext-feature-grid{grid-template-columns:repeat(3, minmax(0, 1fr));grid-template-areas:\"a a b\"\n \"c d d\"\n \"e e f\";gap:1rem}.ext-fa{grid-area:a}.ext-fb{grid-area:b}.ext-fc{grid-area:c}.ext-fd{grid-area:d}.ext-fe{grid-area:e}.ext-ff{grid-area:f}}.ext-feature-card{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:1.75rem;border-radius:1rem;border:1px solid rgba(255, 255, 255, 0.08);background:linear-gradient(\n 180deg,\n rgba(255, 255, 255, 0.02) 0%,\n rgba(255, 255, 255, 0.01) 100%\n );text-decoration:none!important;color:inherit!important;transition:border-color 0.15s ease,\n background 0.15s ease;min-height:190px}.ext-template-grid{display:grid;grid-template-columns:1fr;gap:1rem}@media (min-width: 768px){.ext-template-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}}.ext-feature-card:hover{border-color:rgba(14, 98, 247, 0.45);background:rgba(14, 98, 247, 0.05)}.ext-feature-cta{font-weight:600;color:#0065e6;white-space:nowrap}:root:not(.dark) .ext-feature-card{border-color:rgba(0, 0, 0, 0.08);background:#fff}:root:not(.dark) .ext-feature-card:hover{border-color:rgba(14, 98, 247, 0.45);background:#f8fafc}:root .ext-feature-card{border-bottom-color:rgba(255, 255, 255, 0.08)}:root .ext-feature-card:hover{border-bottom-color:rgba(14, 98, 247, 0.45)}:root:not(.dark) .ext-feature-card{border-bottom-color:rgba(0, 0, 0, 0.08)}:root:not(.dark) .ext-feature-card:hover{border-bottom-color:rgba(14, 98, 247, 0.45)}.ext-dock{max-width:43.125rem;display:flex;flex-direction:column;gap:0.75rem}.ext-dock-row{display:grid;gap:0.75rem;width:100%}.ext-dock-row-top{grid-template-columns:repeat(5, minmax(0, 1fr))}.ext-dock-row-bottom{grid-template-columns:repeat(4, minmax(0, 1fr));padding:0 10%}.frame>.relative,.frame .relative>iframe{border-radius:8px}@supports (corner-shape: superellipse(1.426)){.ext-feature-card,.ext-codepreview,.ext-migrate-callout{corner-shape:superellipse(1.426)}.ext-feature-card{border-radius:1.272rem}.ext-codepreview,.ext-migrate-callout{border-radius:1.59rem}}.ext-dock-tile{aspect-ratio:1 / 1;border-radius:27.2%;overflow:hidden;background:#fff;border:1px solid rgba(255, 255, 255, 0.08);box-shadow:inset 0 1px 1px 0 rgba(255, 255, 255, 0.06);display:flex;align-items:center;justify-content:center}:root:not(.dark) .ext-dock-tile{border-color:rgba(0, 0, 0, 0.08);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.04)}@supports (corner-shape: superellipse(1.5)){.ext-dock-tile{border-radius:36%;corner-shape:superellipse(1.5)}}.ext-dock-tile img{width:100%;height:100%;object-fit:contain;padding:7%}.ext-dock-tile.plain{background:transparent;border:none;box-shadow:none}.ext-dock-tile.plain img{padding:0;object-fit:cover}.ext-footer{width:100%;border-top:1px solid rgba(255, 255, 255, 0.08);margin-top:1rem;padding-top:2rem}:root:not(.dark) .ext-footer{border-top-color:rgba(0, 0, 0, 0.08)}.ext-footer-inner{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:2rem}@media (min-width: 768px){.ext-footer-inner{flex-direction:row;align-items:center}}.ext-footer-cmd code{display:inline-block;padding:0.5rem 0.875rem;border-radius:0.5rem;border:1px solid rgba(255, 255, 255, 0.1);background:rgba(255, 255, 255, 0.04);font-size:0.875rem;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;color:inherit}:root:not(.dark) .ext-footer-cmd code{border-color:rgba(0, 0, 0, 0.08);background:#f8fafc}.ext-footer-right{display:flex;flex-direction:column;gap:1rem}@media (min-width: 768px){.ext-footer-right{align-items:flex-end}}.ext-footer-links{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem 2rem}.ext-footer-links a{display:inline-flex;align-items:center;gap:0.25rem;font-size:0.875rem;color:rgba(255, 255, 255, 0.6);text-decoration:none;transition:color 0.15s ease}.ext-footer-links a:hover{color:#fff;text-decoration:underline;text-underline-offset:4px}:root:not(.dark) .ext-footer-links a{color:rgba(0, 0, 0, 0.6)}:root:not(.dark) .ext-footer-links a:hover{color:#000}.ext-footer-copy{font-size:0.875rem;color:rgba(255, 255, 255, 0.6);margin:0}:root:not(.dark) .ext-footer-copy{color:rgba(0, 0, 0, 0.6)}.ext-footer-copy a{color:inherit;text-decoration:underline;text-underline-offset:4px;transition:color 0.15s ease}.ext-footer-copy a:hover{color:#fff}:root:not(.dark) .ext-footer-copy a:hover{color:#000}.ext-usedby-grid{display:grid;grid-template-columns:1fr;gap:1rem;width:100%}@media (min-width: 768px){.ext-usedby-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}}.ext-usedby-card{position:relative;overflow:hidden;min-height:20rem;border-radius:1rem;border:1px solid rgba(255, 255, 255, 0.08);background:rgba(255, 255, 255, 0.02);transition:border-color 0.15s ease}.ext-usedby-card:hover{border-color:rgba(255, 255, 255, 0.16)}.ext-usedby-body{position:relative;z-index:1;display:flex;flex-direction:column;gap:1rem;height:100%;padding:1.5rem}.ext-usedby-head{display:flex;align-items:flex-start;gap:1rem}.ext-usedby-titles{flex:1;min-width:0}.ext-usedby-name{margin:0!important;font-size:1.25rem;font-weight:500;line-height:1.3}.ext-usedby-meta{margin:0.25rem 0 0!important;font-size:0.75rem;line-height:1.4;color:#a1a1aa}.ext-usedby-pill{display:inline-flex;flex:none;align-items:center;gap:0.3rem;padding:0.2rem 0.55rem;border-radius:999px;border:1px solid rgba(255, 255, 255, 0.12);font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n monospace;font-size:0.75rem;color:#a1a1aa}.ext-usedby-desc{display:-webkit-box;min-height:3rem;margin:0!important;overflow:hidden;font-size:0.875rem;line-height:1.5rem;color:#a1a1aa;-webkit-line-clamp:2;-webkit-box-orient:vertical}.ext-usedby-shot{position:absolute;right:0.125rem;bottom:-2.5rem;z-index:0;width:clamp(160px, 40%, 240px);aspect-ratio:16 / 10;overflow:hidden;border-radius:0.5rem;background:#18181b;box-shadow:0 18px 36px -10px rgba(0, 0, 0, 0.55);pointer-events:none;transform:rotate(-6deg);transform-origin:top left;transition:transform 150ms cubic-bezier(0, 0, 0.2, 1)}.ext-usedby-card:hover .ext-usedby-shot{transform:rotate(-3deg) translate(-3px, -6px)}.ext-usedby-shot img{display:block;width:100%;height:100%;margin:0!important;object-fit:cover;object-position:top left}@media (prefers-reduced-motion: reduce){.ext-usedby-shot{transition:none}}:root:not(.dark) .ext-usedby-card{border-color:rgba(15, 23, 42, 0.1);background:#ffffff}:root:not(.dark) .ext-usedby-card:hover{border-color:rgba(15, 23, 42, 0.2)}:root:not(.dark) .ext-usedby-meta,:root:not(.dark) .ext-usedby-pill,:root:not(.dark) .ext-usedby-desc{color:#52525b}:root:not(.dark) .ext-usedby-pill{border-color:rgba(15, 23, 42, 0.12)}:root:not(.dark) .ext-usedby-shot{background:#f4f4f5;box-shadow:0 18px 36px -10px rgba(15, 23, 42, 0.3)}.ext-usedby-link{color:#60a5fa!important;text-decoration:underline!important;text-underline-offset:3px}:root:not(.dark) .ext-usedby-link{color:#0065e6!important}.ext-usedby-logo{width:96px}.ext-usedby-eyebrow{margin:0!important;font-size:0.875rem;font-weight:600;letter-spacing:0.06em;text-transform:uppercase;color:#60a5fa}:root:not(.dark) .ext-usedby-eyebrow{color:#0065e6}.ext-usedby-steps{display:flex;flex-direction:column;gap:0.75rem;margin:1.5rem 0 0!important;padding:0!important;list-style:none}.ext-usedby-steps li{display:flex;align-items:flex-start;gap:0.75rem;margin:0!important;padding:0!important;font-size:1rem;line-height:1.75rem}.ext-usedby-step-num{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border-radius:999px;border:1px solid rgba(14, 98, 247, 0.45);background:rgba(14, 98, 247, 0.16);color:#93c5fd;font-size:0.8125rem;font-weight:600;line-height:1}:root:not(.dark) .ext-usedby-step-num{border-color:rgba(14, 98, 247, 0.35);background:rgba(14, 98, 247, 0.08);color:#0065e6}.ext-usedby-note{margin:1.25rem 0 0!important;max-width:28rem;font-size:0.875rem;line-height:1.5rem;color:#a1a1aa}:root:not(.dark) .ext-usedby-note{color:#52525b}.ext-usedby-add-code{min-width:0}.ext-usedby-add-code>*{margin-top:0!important;margin-bottom:0!important}.ext-usedby-icon{flex:none;width:56px;height:56px;margin:0!important;object-fit:contain}.ext-usedby-icon-avatar{border-radius:22%;object-fit:cover}:root.dark .ext-usedby-icon-invert{filter:invert(1)}.ext-usedby-links{margin:auto 0 0!important;font-size:0.8125rem;line-height:1.5rem;color:#a1a1aa}.ext-usedby-card-shot .ext-usedby-links{max-width:62%}.ext-usedby-links a{border-bottom:none!important;color:#60a5fa!important;font-weight:500;text-decoration:none!important}.ext-usedby-links a:hover{text-decoration:underline!important;text-underline-offset:3px}:root:not(.dark) .ext-usedby-links{color:#52525b}:root:not(.dark) .ext-usedby-links a{color:#0065e6!important}.ext-usedby-slot{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;min-height:20rem;padding:1.5rem;border-radius:1rem;border:1px dashed rgba(255, 255, 255, 0.18)!important;color:inherit!important;text-align:center;text-decoration:none!important;transition:border-color 0.15s ease}.ext-usedby-slot:hover{border-color:rgba(14, 98, 247, 0.6)!important}.ext-usedby-slot-title{font-size:1.25rem;font-weight:500}.ext-usedby-slot-text{max-width:18rem;font-size:0.875rem;line-height:1.5rem;color:#a1a1aa}:root:not(.dark) .ext-usedby-slot{border-color:rgba(15, 23, 42, 0.2)!important}:root:not(.dark) .ext-usedby-slot-text{color:#52525b}.nav-tabs a.nav-tabs-item[target=\"_blank\"]::after{content:\"\";display:inline-block;flex:none;width:10px;height:10px;background-color:#0065e6;-webkit-mask-image:url(\"https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/arrow-up-right-from-square.svg\");mask-image:url(\"https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/arrow-up-right-from-square.svg\");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}:root.dark .nav-tabs a.nav-tabs-item[target=\"_blank\"]::after{background-color:#60a5fa}.ext-usedby-meta a,.ext-usedby-links a{border-bottom:none!important;color:#60a5fa!important;font-weight:500;text-decoration:none!important}.ext-usedby-meta a:hover{text-decoration:underline!important;text-underline-offset:3px}:root:not(.dark) .ext-usedby-meta a{color:#0065e6!important}.ext-usedby-links-label{display:block;margin:0 0 0.15rem;font-size:0.6875rem;font-weight:600;letter-spacing:0.06em;text-transform:uppercase;color:#71717a}:root:not(.dark) .ext-usedby-links-label{color:#71717a}.ext-usedby-sepline{display:block;overflow:hidden}.ext-usedby-sepline-row{display:flex;flex-wrap:wrap;margin-left:-1rem}.ext-usedby-sepline-item{white-space:nowrap}.ext-usedby-sepline-item::before{content:\"•\";display:inline-block;width:1rem;color:#52525b;text-align:center}:root:not(.dark) .ext-usedby-sepline-item::before{color:#a1a1aa}.ext-usedby-grid{grid-auto-rows:1fr}.ext-usedby-store-list{display:flex;flex-direction:column;gap:0.1rem;margin:0!important;padding:0!important;list-style:none}.ext-usedby-store-list li{margin:0!important;padding:0!important}.ext-usedby-store{display:inline-flex;align-items:center;gap:0.35rem;white-space:nowrap}.ext-usedby-store::after{content:\"\";flex:none;width:10px;height:10px;background-color:#60a5fa;-webkit-mask-image:url(\"https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/arrow-up-right-from-square.svg\");mask-image:url(\"https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/arrow-up-right-from-square.svg\");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}:root:not(.dark) .ext-usedby-store::after{background-color:#0065e6}.ext-usedby-meta a.ext-usedby-author{display:inline-flex;align-items:center;gap:0.35rem;color:#a1a1aa!important;font-weight:400}.ext-usedby-meta a.ext-usedby-author:hover{color:#e4e4e7!important;text-decoration:none!important}.ext-usedby-author-avatar{flex:none;width:16px;height:16px;margin:0!important;border-radius:50%}:root:not(.dark) .ext-usedby-meta a.ext-usedby-author{color:#52525b!important}:root:not(.dark) .ext-usedby-meta a.ext-usedby-author:hover{color:#18181b!important}.ext-usedby-ext{display:inline-flex;align-items:center;gap:0.3rem}.ext-usedby-source::before,.ext-usedby-ext::after{content:\"\";flex:none;background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}.ext-usedby-source::before{width:12px;height:12px;-webkit-mask-image:url(\"https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/brands/github.svg\");mask-image:url(\"https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/brands/github.svg\")}.ext-usedby-ext::after{width:10px;height:10px;-webkit-mask-image:url(\"https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/arrow-up-right-from-square.svg\");mask-image:url(\"https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/arrow-up-right-from-square.svg\")}.ext-tpl{width:100%}.ext-tpl-toolbar{display:flex;align-items:center;gap:1rem}.ext-tpl-search{flex:1;min-width:0;height:2.75rem;padding:0 0.9rem;border-radius:0.6rem;border:1px solid rgba(255, 255, 255, 0.12);background:rgba(255, 255, 255, 0.03);color:#fff;font-size:0.9rem;outline:none}.ext-tpl-search:focus-visible,.ext-tpl-hit:focus-visible,.ext-tpl-close:focus-visible,.ext-tpl-copy:focus-visible,.ext-tpl-tabs button:focus-visible{outline:2px solid #0065e6;outline-offset:2px}.ext-tpl-featured{display:inline-flex;flex:none;align-items:center;gap:0.5rem;font-size:0.875rem;color:#d4d4d8;cursor:pointer}.ext-tpl-featured input{width:1rem;height:1rem;accent-color:#0065e6}.ext-tpl-count{margin:0.75rem 0 1rem!important;font-size:0.75rem;color:#a1a1aa}.ext-tpl-grid{display:grid;grid-template-columns:1fr;gap:1rem}@media (min-width: 700px){.ext-tpl-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (min-width: 1080px){.ext-tpl-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}}.ext-tpl-card{position:relative;overflow:hidden;min-height:17.5rem;border-radius:1rem;border:1px solid rgba(255, 255, 255, 0.08);background:rgba(255, 255, 255, 0.02);transition:border-color 0.15s ease}.ext-tpl-card:hover{border-color:rgba(255, 255, 255, 0.2)}.ext-tpl-body{display:flex;flex-direction:column;gap:1rem;height:100%;padding:1.5rem}.ext-tpl-head{display:flex;align-items:flex-start;gap:1rem}.ext-tpl-icon{display:block;flex:none;width:4rem;height:4rem;margin:0!important;border-radius:0.5rem;object-fit:contain}.ext-tpl-icon-sm{width:3rem;height:3rem}.ext-tpl-titles{flex:1;min-width:0}.ext-tpl-name{margin:0!important;color:#fff;font-size:1.2rem;font-weight:500;line-height:1.3}.ext-tpl-hit{padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.ext-tpl-hit::after{content:\"\";position:absolute;inset:0;z-index:2}.ext-tpl-meta{margin:0.25rem 0 0!important;font-size:0.75rem;color:#a1a1aa}.ext-tpl-pill{flex:none;padding:0.15rem 0.55rem;border-radius:999px;border:1px solid rgba(255, 255, 255, 0.12);font-size:0.72rem;color:#a1a1aa}.ext-tpl-desc{display:-webkit-box;min-height:3rem;margin:0!important;overflow:hidden;font-size:0.875rem;line-height:1.5rem;color:#a1a1aa;-webkit-line-clamp:2;-webkit-box-orient:vertical}.ext-tpl-browsers{position:relative;z-index:1;display:flex;flex-direction:column;gap:0.5rem;margin-top:auto}.ext-tpl-browsers-label{font-size:0.68rem;font-weight:600;letter-spacing:0.08em;text-transform:uppercase;color:#8b8b93}.ext-tpl-browsers-row{display:flex;gap:0.5rem;margin:0!important;padding:0!important;list-style:none}.ext-tpl-browsers-row li{margin:0!important;padding:0!important}.ext-tpl-browsers-row img{display:block;width:1.5rem;height:1.5rem;margin:0!important}.ext-tpl-shot{position:absolute;right:0.125rem;bottom:-2.25rem;width:clamp(140px, 44%, 200px);aspect-ratio:16 / 10;overflow:hidden;border-radius:0.5rem;background:#18181b;box-shadow:0 18px 36px -10px rgba(0, 0, 0, 0.55);pointer-events:none;transform:rotate(-6deg);transform-origin:top left;transition:transform 150ms cubic-bezier(0, 0, 0.2, 1)}.ext-tpl-card:hover .ext-tpl-shot{transform:rotate(-3deg) translate(-3px, -6px)}.ext-tpl-shot img{display:block;width:100%;height:100%;margin:0!important;object-fit:cover;object-position:top left}.ext-tpl-empty{padding:3rem 0;text-align:center;color:#a1a1aa}.ext-tpl-overlay{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:4vh 1rem;background:rgba(0, 0, 0, 0.7);backdrop-filter:blur(6px)}.ext-tpl-dialog{position:relative;display:flex;flex-direction:column;gap:1rem;width:100%;max-width:48rem;height:min(92vh, 54rem);padding:1.5rem;overflow:hidden;border-radius:1.75rem;border:1px solid rgba(255, 255, 255, 0.12);background:#161618;color:#f4f4f5;box-shadow:0 30px 80px -20px rgba(0, 0, 0, 0.8)}.ext-tpl-close{position:absolute;top:1rem;right:1rem;display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border-radius:0.6rem;border:1px solid rgba(255, 255, 255, 0.14);background:rgba(255, 255, 255, 0.04);color:inherit;cursor:pointer}.ext-tpl-dialog-head{display:flex;align-items:center;gap:1rem;padding-right:3rem}.ext-tpl-dialog-head h2{margin:0!important;font-size:1.5rem;font-weight:600;letter-spacing:-0.01em}.ext-tpl-dialog-head p{margin:0.15rem 0 0!important;font-size:0.875rem;color:#a1a1aa}.ext-tpl-tabs{display:grid;grid-template-columns:1fr 1fr;gap:3px;padding:3px;border-radius:0.6rem;background:rgba(255, 255, 255, 0.06)}.ext-tpl-tabs button{padding:0.5rem 0.75rem;border:0;border-radius:0.45rem;background:transparent;color:#a1a1aa;font-size:0.875rem;font-weight:500;cursor:pointer}.ext-tpl-tabs button.is-active{background:#0a0a0b;color:#fff}.ext-tpl-panel{display:flex;flex:1;flex-direction:column;gap:0.75rem;min-height:0;overflow-y:auto}.ext-tpl-section-title{display:flex;align-items:center;gap:0.75rem;margin-top:0.5rem}.ext-tpl-section-title h3{margin:0!important;font-size:1.1rem;font-weight:500}.ext-tpl-section-title span{flex:1;height:1px;background:rgba(255, 255, 255, 0.1)}.ext-tpl-muted{margin:0!important;font-size:0.875rem;line-height:1.6;color:#a1a1aa}.ext-tpl-oneline{flex:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ext-tpl-media{flex:none;overflow:hidden;border-radius:0.6rem;border:1px solid rgba(255, 255, 255, 0.1)}.ext-tpl-media iframe,.ext-tpl-media img{display:block;width:100%;aspect-ratio:16 / 9;margin:0!important;border:0;object-fit:cover;object-position:top left}.ext-tpl-command{position:relative;flex:none;border-radius:0.6rem;border:1px solid rgba(255, 255, 255, 0.1);background:#0a0a0b}.ext-tpl-command{transition:border-color 0.3s ease,\n box-shadow 0.3s ease}.ext-tpl-command.is-flash{border-color:#0065e6;box-shadow:0 0 0 3px rgba(0, 101, 230, 0.45)}.ext-tpl-jump{display:inline-flex;align-items:center;gap:0.35rem;flex:none;padding:0.25rem 0.65rem;border:1px solid rgba(255, 255, 255, 0.14);border-radius:999px;background:transparent;font-size:0.78rem;font-weight:500;color:#d4d4d8;cursor:pointer;transition:border-color 0.15s ease,\n color 0.15s ease}.ext-tpl-jump:hover{border-color:#0065e6;color:#fff}.ext-tpl-command pre{margin:0!important;padding:1rem 5.5rem 1rem 1rem;overflow-x:auto;background:transparent;font-size:0.82rem;line-height:1.7;color:#e4e4e7}.ext-tpl-command code{padding:0;border:0;background:transparent;color:inherit;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n monospace}.ext-tpl-copy{position:absolute;top:0.6rem;right:0.6rem;padding:0.35rem 0.8rem;border:0;border-radius:0.45rem;background:#0065e6;color:#fff;font-size:0.8rem;font-weight:600;cursor:pointer}.ext-tpl-list{margin:0!important;padding-left:1.25rem!important;font-size:0.875rem;line-height:1.7;color:#d4d4d8}ol.ext-tpl-list{list-style:decimal}ul.ext-tpl-list{list-style:disc}.ext-tpl-links{display:flex;gap:1.25rem;margin-top:0.5rem;font-size:0.875rem}.ext-tpl-links a{color:#60a5fa;text-decoration:underline;text-underline-offset:3px}@media (prefers-reduced-motion: reduce){.ext-tpl-shot{transition:none}}:root:not(.dark) .ext-tpl-search{border-color:rgba(15, 23, 42, 0.15);background:#fff;color:#0a0a0b}:root:not(.dark) .ext-tpl-featured,:root:not(.dark) .ext-tpl-list{color:#3f3f46}:root:not(.dark) .ext-tpl-card{border-color:rgba(15, 23, 42, 0.1);background:#fff}:root:not(.dark) .ext-tpl-card:hover{border-color:rgba(15, 23, 42, 0.25)}:root:not(.dark) .ext-tpl-count,:root:not(.dark) .ext-tpl-meta,:root:not(.dark) .ext-tpl-pill,:root:not(.dark) .ext-tpl-desc,:root:not(.dark) .ext-tpl-muted,:root:not(.dark) .ext-tpl-empty,:root:not(.dark) .ext-tpl-dialog-head p,:root:not(.dark) .ext-tpl-browsers-label{color:#52525b}:root:not(.dark) .ext-tpl-pill{border-color:rgba(15, 23, 42, 0.12)}:root:not(.dark) .ext-tpl-name{color:#0a0a0b}:root:not(.dark) .ext-tpl-jump{border-color:rgba(15, 23, 42, 0.16);color:#3f3f46}:root:not(.dark) .ext-tpl-jump:hover{border-color:#0065e6;color:#0065e6}:root:not(.dark) .ext-tpl-command pre{color:#e4e4e7}:root:not(.dark) .ext-tpl-shot{background:#f4f4f5;box-shadow:0 18px 36px -10px rgba(15, 23, 42, 0.3)}:root:not(.dark) .ext-tpl-overlay{background:rgba(15, 23, 42, 0.45)}:root:not(.dark) .ext-tpl-dialog{border-color:rgba(15, 23, 42, 0.12);background:#fff;color:#0a0a0b}:root:not(.dark) .ext-tpl-close{border-color:rgba(15, 23, 42, 0.14);background:#fff}:root:not(.dark) .ext-tpl-tabs{background:#f4f4f5}:root:not(.dark) .ext-tpl-tabs button{color:#52525b}:root:not(.dark) .ext-tpl-tabs button.is-active{background:#fff;color:#0a0a0b;box-shadow:0 1px 2px rgba(15, 23, 42, 0.12)}:root:not(.dark) .ext-tpl-section-title span{background:rgba(15, 23, 42, 0.1)}:root:not(.dark) .ext-tpl-media{border-color:rgba(15, 23, 42, 0.1)}:root:not(.dark) .ext-tpl-links a{color:#0065e6}"}]}
{"page":{"pagePath":"zh-Hans/templates","slug":"/zh-Hans/templates","pageMetadata":{"title":"浏览器扩展模板","description":"适用于 Chrome、Edge、Firefox 和 Safari 扩展的起步项目。挑一个模板,复制它的创建命令,几分钟内就能在真实浏览器中运行。","mode":"custom","keywords":["extension.js","templates","browser extension templates","chrome extension template","firefox extension template","react extension template","starter","boilerplate"],"href":"/zh-Hans/templates"},"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: \"适用于 Chrome、Edge、Firefox 和 Safari 扩展的起步项目。挑一个模板,复制它的创建命令,几分钟内就能在真实浏览器中运行。\"\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{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const TemplatesGallery=({locale=`en`})=>{const _components={a:`a`,..._provideComponents()};const templates=[{slug:`action`,title:`Action (Popup)`,description:`Adds a toolbar popup to the browser with a simple page.`,surfaces:[`action`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`action`,`popup`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`AWMlWK934qE`,docsUrl:`https://extension.js.org/docs/implementation-guide/manifest-json`,firstSteps:[`Run npm run dev to launch the extension`,`Click the toolbar icon to open the action popup`,`Edit src/action/index.html and watch HMR update the popup`],useCases:[`Toolbar popup as the primary UI surface`,`Quick actions that don't need a full sidebar or page`,`Starting point for popup-based browser extensions`]},{slug:`action-locales`,title:`Action Locales`,description:`Adds a toolbar popup whose text follows your browser's language.`,surfaces:[`action`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`action`,`popup`,`i18n`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`bY0Mtv77bVc`,docsUrl:`https://extension.js.org/docs/implementation-guide/locales`,firstSteps:[`Run npm run dev to launch the extension`,`Click the toolbar icon to see the popup in your browser's language`,`Add a folder under _locales/ and switch your browser language to see it`],useCases:[`A toolbar popup translated with the i18n API`,`Shipping _locales without hand-editing the manifest`,`Reference for localized extension UI across browsers`]},{slug:`action-preact`,title:`Preact Action (Popup)`,description:`Adds a toolbar popup to the browser with a simple Preact page.`,surfaces:[`action`,`background`],framework:`preact`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`action`,`popup`,`preact`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:null,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/preact`,firstSteps:[`Run npm run dev to launch the extension`,`Click the toolbar icon to open the action popup`,`Edit src/action/ActionApp.tsx and save to see fast refresh update it`],useCases:[`A toolbar popup rendered by Preact`,`Quick actions that read and open tabs with no permission`,`Starting point for Preact extensions with a popup`]},{slug:`action-svelte`,title:`Svelte Action (Popup)`,description:`Adds a toolbar popup to the browser with a simple Svelte page.`,surfaces:[`action`,`background`],framework:`svelte`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`action`,`popup`,`svelte`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:null,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/svelte`,firstSteps:[`Run npm run dev to launch the extension`,`Click the toolbar icon to open the action popup`,`Edit src/action/ActionApp.svelte and save to watch it update`],useCases:[`Toolbar popup rendered by Svelte as the primary UI surface`,`Quick actions that update the toolbar badge from the popup`,`Starting point for Svelte extensions with a popup`]},{slug:`action-vue`,title:`Vue Action (Popup)`,description:`Adds a toolbar popup to the browser with a simple Vue page.`,surfaces:[`action`,`background`],framework:`vue`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`action`,`popup`,`vue`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:null,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/vue`,firstSteps:[`Run npm run dev to launch the extension`,`Click the toolbar icon to open the Vue popup`,`Edit src/action/ActionApp.vue and save to watch it update`],useCases:[`A toolbar popup rendered by Vue`,`Single-file components compiled with no extra config`,`Starting point for Vue extensions with a popup`]},{slug:`ai-chatgpt`,title:`ChatGPT AI Sidebar`,description:`Adds a sidebar panel where you can chat with ChatGPT about the page you are viewing.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:`react`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`ai`,`chatgpt`,`openai`,`gpt`,`chat`,`sidebar`,`content-scripts`,`react`,`shadcn`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`oEiJ_b36EtE`,docsUrl:`https://platform.openai.com/docs/api-reference/chat`,firstSteps:[`Run npm run dev to launch the extension`,`Open any web page and click the extension icon to open the sidebar`,`Enter your ChatGPT API key (from platform.openai.com)`,`Ask ChatGPT about the active tab, and the content script feeds the page text into the conversation`],useCases:[`Chat with the active tab's content using ChatGPT`,`Summarize or question articles, docs, and dashboards in place`,`Starting point for page-aware ChatGPT extensions`]},{slug:`ai-claude`,title:`Claude AI Sidebar`,description:`Adds a sidebar panel where you can chat with Claude about the page you are viewing.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:`react`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`ai`,`claude`,`anthropic`,`chat`,`sidebar`,`content-scripts`,`react`,`shadcn`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`z3JmyUlmiUw`,docsUrl:`https://docs.anthropic.com/en/api/getting-started`,firstSteps:[`Run npm run dev to launch the extension`,`Open any web page and click the extension icon to open the sidebar`,`Enter your Claude API key (from console.anthropic.com)`,`Ask Claude about the active tab, and the content script feeds the page text into the conversation`],useCases:[`Chat with the active tab's content using Claude`,`Summarize or question articles, docs, and dashboards in place`,`Starting point for page-aware Claude extensions`]},{slug:`ai-gemini`,title:`Gemini AI Sidebar`,description:`Adds a sidebar panel where you can chat with Gemini about the page you are viewing.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:`react`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`ai`,`gemini`,`google`,`chat`,`sidebar`,`content-scripts`,`react`,`shadcn`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`I2uhXovfurE`,docsUrl:`https://ai.google.dev/gemini-api/docs`,firstSteps:[`Run npm run dev to launch the extension`,`Open any web page and click the extension icon to open the sidebar`,`Enter your Gemini API key (from aistudio.google.com)`,`Ask Gemini about the active tab, and the content script feeds the page text into the conversation`],useCases:[`Chat with the active tab's content using Gemini`,`Summarize or question articles, docs, and dashboards in place`,`Starting point for page-aware Gemini extensions`]},{slug:`ai-perplexity`,title:`Perplexity AI Sidebar`,description:`Adds a sidebar panel where you can chat with Perplexity about the page you are viewing.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:`react`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`ai`,`perplexity`,`search`,`chat`,`sidebar`,`content-scripts`,`react`,`shadcn`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`W9j9rUrevjI`,docsUrl:`https://docs.perplexity.ai/`,firstSteps:[`Run npm run dev to launch the extension`,`Open any web page and click the extension icon to open the sidebar`,`Enter your Perplexity API key (from perplexity.ai/settings/api)`,`Ask Perplexity about the active tab, and the content script feeds the page text into the conversation`],useCases:[`Chat with the active tab's content using Perplexity`,`Summarize or question articles, docs, and dashboards in place`,`Starting point for page-aware Perplexity extensions`]},{slug:`content`,title:`Content scripts`,description:`Injects a small badge into every web page you visit, with an options page that moves it to the left or right edge.`,surfaces:[`content`,`options`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content`,`options`,`storage`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`GflWcgdS9Tw`,docsUrl:`https://extension.js.org/docs/implementation-guide/content-scripts`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the badge injected into the page`,`Tick the setting and watch the badge move to the left edge`],useCases:[`A plain JavaScript UI injected into every page`,`One position setting shared between an options page and a content script`,`Starting point for content scripts that need preferences`]},{slug:`content-css-modules`,title:`Content CSS Modules`,description:`Injects a small styled badge into every web page you visit.`,surfaces:[`content`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content-scripts`,`css-modules`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`ondh3B28ieQ`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/css-modules`,firstSteps:[`Run npm run dev to launch the extension`,`Open any web page to see the badge this template injects`,`Edit src/content/styles.module.css and save to restyle the badge`],useCases:[`A content script styled with CSS modules`,`Class names hashed so page styles never collide`,`Starting point for content scripts that need scoped CSS`]},{slug:`content-custom-font`,title:`Custom fonts in a content script`,description:`Injects a badge rendered in a custom font into every web page you visit, with an options page that turns the custom font on and off.`,surfaces:[`content`,`options`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content`,`fonts`,`options`,`storage`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`IAbckjfGO5Y`,docsUrl:`https://extension.js.org/docs/implementation-guide/css`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the badge injected into the page`,`Untick the setting and watch the badge fall back to the system font`],useCases:[`A content script that ships its own typeface`,`One font setting shared between an options page and a content script`,`Starting point for injected UI that must not inherit host page type`]},{slug:`content-env`,title:`Content Env`,description:`Injects a small panel showing the extension's environment values into every web page you visit.`,surfaces:[`content`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content-scripts`,`env`,`configuration`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`Q-ugTIZVZ-U`,docsUrl:`https://extension.js.org/docs/features/environment-variables`,firstSteps:[`Run npm run dev to launch the extension`,`Open any web page to see the panel print the injected values`,`Edit .env.chrome or .env.firefox to change what the panel reads`],useCases:[`Reading build-time configuration inside a content script`,`Switching behavior per browser without touching the source`,`Reference for EXTENSION_PUBLIC_* values in typed sources`]},{slug:`content-less`,title:`Content Less`,description:`Injects a small styled badge into every web page you visit, with a Less options page that moves it to the left or right edge.`,surfaces:[`content`,`options`,`background`],framework:null,css:`less`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`content`,`options`,`storage`,`less`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`VGssDbxBeMM`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/less`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the badge injected into the page`,`Tick the setting and watch the badge move to the left edge`],useCases:[`A Less-styled badge injected into every page`,`One position setting shared between an options page and a content script`,`Starting point for Less extensions that need preferences`]},{slug:`content-less-modules`,title:`Content Less Modules`,description:`Injects a small styled badge into every web page, with a Less modules options page that moves it to the left or right edge.`,surfaces:[`content`,`options`,`background`],framework:null,css:`less`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content`,`options`,`storage`,`less-modules`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`Q1fNVB2ZuNw`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/less`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the badge injected into the page`,`Tick the setting and watch the badge move to the left edge`],useCases:[`Hashed class names shared by a content script and an options page`,`One position setting shared between an options page and a content script`,`Starting point for CSS Modules extensions that need preferences`]},{slug:`content-main-world`,title:`Main-world Content Script`,description:`Injects a small UI into every page from the extension and the page world, with an options page that moves it left or right.`,surfaces:[`content`,`options`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`intermediate`,tags:[`content-scripts`,`main-world`,`isolated-world`,`options`,`storage`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`3-C3wCE3fWU`,docsUrl:`https://extension.js.org/docs/implementation-guide/content-scripts`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the UI injected into the page`,`Tick the setting and watch the main-world UI move to the left edge`],useCases:[`Hook into page-level globals that isolated content scripts cannot reach`,`Bridge isolated and main-world execution contexts cleanly`,`Read a stored setting from a main-world script that has no chrome APIs`]},{slug:`content-multi-one-entry`,title:`Content Multi One Entry`,description:`Injects four small elements into every web page you visit.`,surfaces:[`content`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content-scripts`,`multi-entry`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`l1QWq7lIKo8`,docsUrl:`https://extension.js.org/docs/implementation-guide/content-scripts`,firstSteps:[`Run npm run dev to launch the extension`,`Open any web page and an element appears in each of its four corners`,`Edit one script in src/content/ and save to see that corner update`],useCases:[`Four scripts shipped from a single content-script entry`,`One match rule driving several focused files`,`Reference for grouping content scripts under one entry`]},{slug:`content-multi-three-entries`,title:`Multi-entry Content Scripts`,description:`Injects four small elements into every web page you visit.`,surfaces:[`content`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`intermediate`,tags:[`content-scripts`,`multi-entry`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`oDcdmGaIBjw`,docsUrl:`https://extension.js.org/docs/implementation-guide/content-scripts`,firstSteps:[`Run npm run dev to launch the extension`,`Open any page and three separate content scripts inject small elements`,`Edit any of the entries in src/content/ to see HMR update independently`],useCases:[`Split content-script logic across multiple entries with different match rules`,`Target different page contexts with focused, independent bundles`,`Reference for the multi-entry content_scripts pattern in MV3`]},{slug:`content-preact`,title:`Content Preact`,description:`Shows an overlay UI on web pages and an options page that moves it from right to left.`,surfaces:[`content`,`options`,`background`],framework:`preact`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content`,`options`,`storage`,`preact`,`typescript`,`tailwind`],icon:`src/images/icon-128.png`,screenshot:`screenshot.png`,video:`sYA3V9YIWwo`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/preact`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the overlay injected into the page`,`Tick the setting and watch the overlay move to the left edge`],useCases:[`An on-page UI written in Preact and isolated in a Shadow DOM`,`One setting shared between an options page and a content script`,`Starting point for Preact extensions that need preferences`]},{slug:`content-react`,title:`Content React`,description:`Shows a small overlay UI on every web page, with a React options page that moves it from right to left.`,surfaces:[`content`,`options`,`background`],framework:`react`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content`,`options`,`storage`,`react`,`typescript`,`tailwind`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`oGNhj9k4bNs`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/react`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the overlay injected into the page`,`Tick the setting and watch the overlay move to the left edge`],useCases:[`A React UI injected into any page, isolated in a Shadow DOM`,`One setting shared between a React options page and a content script`,`Starting point for content-script extensions that need preferences`]},{slug:`content-sass`,title:`Content scripts with Sass`,description:`Injects a small styled badge into every web page you visit, with a Sass options page that moves it to the left or right edge.`,surfaces:[`content`,`options`,`background`],framework:null,css:`sass`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`content`,`sass`,`options`,`storage`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`-VceQYe_KMk`,docsUrl:`https://extension.js.org/docs/implementation-guide/css`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the badge injected into the page`,`Tick the setting and watch the badge move to the left edge`],useCases:[`A badge injected into every page and styled with Sass`,`One position setting shared between an options page and a content script`,`Starting point for Sass content scripts that need preferences`]},{slug:`content-sass-modules`,title:`Content scripts with Sass modules`,description:`Injects a small styled badge into every web page, with a Sass modules options page that moves it to the left or right edge.`,surfaces:[`content`,`options`,`background`],framework:null,css:`sass`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content`,`sass`,`css-modules`,`options`,`storage`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`Ma9f_Q1C7Eo`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/sass`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the badge injected into the page`,`Tick the setting and watch the badge move to the left edge`],useCases:[`A badge injected into every page and styled with hashed Sass module class names`,`One position setting shared between an options page and a content script`,`Starting point for Sass module content scripts that need preferences`]},{slug:`content-svelte`,title:`Content Svelte`,description:`Shows a Svelte overlay on every web page you visit, with an options page that moves it from right to left.`,surfaces:[`content`,`options`,`background`],framework:`svelte`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content`,`svelte`,`typescript`,`tailwind`,`options`,`storage`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`g6-GZ6_Rn38`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/svelte`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the overlay injected into the page`,`Tick the setting and watch the overlay move to the left edge`],useCases:[`A Svelte overlay injected into every page, isolated in a Shadow DOM`,`One setting shared between a Svelte options page and a content script`,`Starting point for Svelte extensions that need preferences`]},{slug:`content-typescript`,title:`Content TypeScript`,description:`Shows a small overlay UI on every web page, with an options page that moves it from right to left.`,surfaces:[`content`,`options`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content`,`options`,`storage`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`9OBuuh3N_cM`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/typescript`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the overlay injected into the page`,`Tick the setting and watch the overlay move to the left edge`],useCases:[`A typed overlay injected into every page`,`One setting shared between an options page and a content script`,`Starting point for TypeScript extensions that need preferences`]},{slug:`content-vue`,title:`Content Vue`,description:`Shows a small overlay UI on every web page, with a Vue options page that moves it from right to left.`,surfaces:[`content`,`options`,`background`],framework:`vue`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`content`,`options`,`storage`,`vue`,`typescript`,`tailwind`],icon:`src/images/logo.svg`,screenshot:`screenshot.png`,video:`LIfZxR-B2Nk`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/vue`,firstSteps:[`Run npm run dev to launch the extension`,`Click Open options on the overlay injected into the page`,`Tick the setting and watch the overlay move to the left edge`],useCases:[`A Vue overlay injected into every page, isolated in a Shadow DOM`,`One setting shared between a Vue options page and a content script`,`Starting point for Vue extensions that need preferences`]},{slug:`devtools`,title:`Devtools panel`,description:`Adds a devtools panel to the browser that reads the inspected page.`,surfaces:[`devtools`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`devtools`,`panel`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`kyJk6ksDOsU`,docsUrl:`https://extension.js.org/docs/implementation-guide/manifest-json`,firstSteps:[`Run npm run dev to launch the extension`,`Open the browser devtools with F12 or Cmd+Option+I, then pick the Example tab`,`Edit src/panel/index.html and reopen devtools to see the change`],useCases:[`A devtools panel as the primary UI surface`,`Inspecting the current page from inside the developer tools`,`Starting point for debugging tools built as browser extensions`]},{slug:`devtools-preact`,title:`Devtools panel Preact`,description:`Adds a devtools panel written in Preact that reads the inspected page.`,surfaces:[`devtools`],framework:`preact`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`devtools`,`panel`,`preact`,`typescript`],icon:`src/images/icon-128.png`,screenshot:`screenshot.png`,video:`WjPVn5SlGaU`,docsUrl:`https://extension.js.org/docs/implementation-guide/manifest-json`,firstSteps:[`Run npm run dev to launch the extension`,`Open the browser devtools with F12 or Cmd+Option+I, then pick the Example tab`,`Edit src/panel/PanelApp.tsx and reopen devtools to see the change`],useCases:[`A devtools panel as the primary UI surface`,`Inspecting the current page from inside the developer tools`,`Starting point for Preact debugging tools built as browser extensions`]},{slug:`devtools-react`,title:`React devtools panel`,description:`Adds a React devtools panel to the browser that reads the inspected page.`,surfaces:[`devtools`],framework:`react`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`devtools`,`panel`,`react`,`typescript`],icon:`src/images/icon-128.png`,screenshot:`screenshot.png`,video:`mRZO9Eg2aUQ`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/react`,firstSteps:[`Run npm run dev to launch the extension`,`Open the browser devtools with F12 or Cmd+Option+I, then pick the Example tab`,`Edit src/panel/PanelApp.tsx and save to see the panel update`],useCases:[`A React devtools panel as the primary UI surface`,`Inspecting the current page from inside the developer tools`,`Starting point for debugging tools built as browser extensions`]},{slug:`devtools-svelte`,title:`Devtools panel with Svelte`,description:`Adds a Svelte devtools panel to the browser that reads the inspected page.`,surfaces:[`devtools`],framework:`svelte`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`devtools`,`panel`,`svelte`,`typescript`],icon:`src/images/icon-128.png`,screenshot:`screenshot.png`,video:`SqOxa9hRg1s`,docsUrl:`https://extension.js.org/docs/implementation-guide/manifest-json`,firstSteps:[`Run npm run dev to launch the extension`,`Open the browser devtools with F12 or Cmd+Option+I, then pick the Example tab`,`Edit src/panel/PanelApp.svelte and reopen devtools to see the change`],useCases:[`A devtools panel as the primary UI surface`,`Inspecting the current page from inside the developer tools`,`Starting point for debugging tools built as browser extensions`]},{slug:`devtools-typescript`,title:`Devtools panel (TypeScript)`,description:`Adds a devtools panel to the browser that reads the inspected page.`,surfaces:[`devtools`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`devtools`,`panel`,`typescript`],icon:`src/images/icon-128.png`,screenshot:`screenshot.png`,video:`iI1Th6Hi_ck`,docsUrl:`https://extension.js.org/docs/implementation-guide/manifest-json`,firstSteps:[`Run npm run dev to launch the extension`,`Open the browser devtools with F12 or Cmd+Option+I, then pick the Example tab`,`Edit src/panel/index.html and reopen devtools to see the change`],useCases:[`A devtools panel as the primary UI surface`,`Inspecting the current page from inside the developer tools`,`Starting point for debugging tools built as browser extensions`]},{slug:`devtools-typescript-sqlite`,title:`SQLite DevTools Panel`,description:`Records the inspected page's network requests in SQLite and lets you query them.`,surfaces:[`devtools`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`devtools`,`panel`,`sqlite`,`wasm`,`typescript`],icon:`src/images/icon-128.png`,screenshot:`screenshot.png`,video:null,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/typescript`,firstSteps:[`Run npm install, then npm run dev`,`Open the browser devtools on any page, then pick the Requests tab`,`Run a SQL query against the requests table`],useCases:[`Record the inspected page's network requests in SQLite`,`Query those requests with SQL from a devtools panel`,`Ship sql.js inside an extension without a CDN`]},{slug:`devtools-vue`,title:`Devtools panel with Vue`,description:`Adds a devtools panel built with Vue that reads the inspected page.`,surfaces:[`devtools`],framework:`vue`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`devtools`,`panel`,`vue`,`typescript`],icon:`src/images/icon-128.png`,screenshot:`screenshot.png`,video:`sp-bjexg2X8`,docsUrl:`https://extension.js.org/docs/implementation-guide/manifest-json`,firstSteps:[`Run npm run dev to launch the extension`,`Open the browser devtools with F12 or Cmd+Option+I, then pick the Example tab`,`Edit src/panel/PanelApp.vue and reopen devtools to see the change`],useCases:[`A devtools panel as the primary UI surface`,`Inspecting the current page from inside the developer tools`,`Starting point for debugging tools built as browser extensions`]},{slug:`init`,title:`Initial`,description:`A minimal extension that loads in your browser, ready to build on.`,surfaces:[],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`minimal`,`javascript`],icon:`src/images/icon-128.png`,screenshot:`screenshot.png`,video:null,docsUrl:`https://extension.js.org/docs/getting-started/immediately`,firstSteps:[`Run npm run dev to launch the extension`,`The extension loads in a fresh profile with no surface of its own`,`Add src/newtab/index.html and it ships on the next reload`],useCases:[`The smallest Extension.js project that still runs`,`A blank slate for whichever surface you choose`,`Reference for the minimum an MV3 extension needs`]},{slug:`javascript`,title:`JavaScript`,description:`Adds a sidebar panel to the browser with a simple page.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`sidebar`,`javascript`,`content-scripts`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`Ryjuq2o-kzc`,docsUrl:`https://extension.js.org/docs/getting-started/templates/javascript`,firstSteps:[`Run npm run dev to launch the extension`,`Click the extension icon to open the sidebar panel`,`Edit src/sidebar/index.html and save to watch the panel update`],useCases:[`A sidebar panel as the primary UI surface`,`Plain JavaScript with no compiler config to maintain`,`Starting point for extensions written in JavaScript`]},{slug:`newtab`,title:`New Tab`,description:`Replaces your new tab page with a simple page you can customize.`,surfaces:[`newtab`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`fouoMkXLyvQ`,docsUrl:`https://extension.js.org/docs/implementation-guide/html`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab and this page loads in place of the default`,`Edit src/newtab/index.html and save to watch the tab update`],useCases:[`A new tab page as the primary UI surface`,`Dashboards, launchers, and start pages`,`Starting point for new tab extensions in JavaScript`]},{slug:`newtab-browser-flags`,title:`New Tab Browser Flags`,description:`Replaces your new tab page with a launcher that opens the extension's sidebar panel.`,surfaces:[`content`,`newtab`,`sidebar`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`sidebar`,`configuration`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:null,docsUrl:`https://extension.js.org/docs/browsers/browser-flags`,firstSteps:[`Run npm run dev to launch the extension`,`The browser starts with the flags this template sets in extension.config.js`,`Open a new tab and use the launcher to open the sidebar panel`],useCases:[`Passing custom browser flags through extension.config.js`,`A new tab launcher that opens another extension surface`,`Reference for browser-specific differences across targets`]},{slug:`newtab-config-eslint`,title:`New Tab Config ESLint`,description:`Replaces your new tab page with a simple page.`,surfaces:[`newtab`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`configuration`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`CoS-_Cv-SvM`,docsUrl:`https://extension.js.org/docs/integrations/eslint`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab to see the page this template ships`,`Run npx eslint src to check the source with the bundled config`],useCases:[`A new tab extension that lints its own source`,`ESLint wired into an Extension.js project without ejecting`,`Reference for adding a linter to an extension codebase`]},{slug:`newtab-config-prettier`,title:`New Tab Config Prettier`,description:`Replaces your new tab page with a simple page.`,surfaces:[`newtab`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`configuration`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`JnNNaUzefTg`,docsUrl:`https://extension.js.org/docs/integrations/prettier`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab to see the page this template ships`,`Run npx prettier --check src to see the rules this template ships`],useCases:[`A new tab extension that formats its own source`,`Prettier wired into an Extension.js project without ejecting`,`Reference for adding a formatter to an extension codebase`]},{slug:`newtab-config-stylelint`,title:`New Tab Config Stylelint`,description:`Replaces your new tab page with a simple page.`,surfaces:[`newtab`,`background`],framework:null,css:`sass`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`sass`,`configuration`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`3DVh7oDKFxo`,docsUrl:`https://extension.js.org/docs/integrations/stylelint`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab to see the styled page this template ships`,`Run npx stylelint src to check the Sass with the bundled config`],useCases:[`A new tab extension that lints its own stylesheets`,`Stylelint and Sass wired into an Extension.js project`,`Reference for adding a style linter to an extension codebase`]},{slug:`newtab-crypto`,title:`New Tab Crypto`,description:`Replaces your new tab page with a page that hashes any text you type using SHA-256.`,surfaces:[`newtab`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`web-crypto`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`dPdh5H_sTgw`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/node`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab and type any text to see its SHA-256 hash`,`Edit src/newtab/scripts.ts to hash with a different algorithm`],useCases:[`Hashing text with the Web Crypto API inside an extension`,`A new tab page that does real work with no network`,`Reference for browser crypto primitives under MV3`]},{slug:`newtab-env`,title:`Environment Variables`,description:`Replaces your new tab page with a page showing the extension's environment values.`,surfaces:[`newtab`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`env`,`configuration`,`new-tab`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`8XP2acacpK8`,docsUrl:`https://extension.js.org/docs/features/environment-variables`,firstSteps:[`Copy .env.example to .env and edit the values`,`Run npm run dev to launch the extension`,`Open a new tab and the page reads injected EXTENSION_PUBLIC_* values`],useCases:[`Inject build-time configuration without leaking secrets`,`Switch behavior per browser, mode, or deployment target`,`Reference for safe env-var usage across JS, JSON, and HTML`]},{slug:`newtab-less`,title:`New Tab Less`,description:`Replaces your new tab page with a simple styled page.`,surfaces:[`newtab`,`background`],framework:null,css:`less`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`less`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`T4Bgw8pCYY0`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/less`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab to see the styled page this template ships`,`Edit src/newtab/styles.less and save to watch the styles reload`],useCases:[`A new tab page styled with Less`,`Less compiled by Extension.js with no extra config`,`Starting point for extensions that prefer Less to plain CSS`]},{slug:`newtab-preact`,title:`New Tab Preact`,description:`Replaces your new tab page with a simple Preact page.`,surfaces:[`newtab`,`background`],framework:`preact`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`preact`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`ezN6818j744`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/preact`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab to see the Preact page this template ships`,`Edit src/newtab/NewTabApp.tsx and save to see fast refresh update it`],useCases:[`A new tab page rendered by Preact`,`Preact and JSX compiled with no extra config`,`Starting point for Preact extensions with a new tab`]},{slug:`newtab-preact-router`,title:`Preact Router New Tab`,description:`Replaces your new tab page with a small Preact app you can navigate across routes.`,surfaces:[`newtab`,`background`],framework:`preact`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`preact`,`routing`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:null,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/preact`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab and follow the links to move between routes`,`Add a route in src/newtab/NewTabApp.tsx and it renders with no server`],useCases:[`A multi-route new tab app with client-side routing`,`Hash routing in Preact inside an extension page`,`Reference for routing with no server under MV3`]},{slug:`newtab-react`,title:`New Tab React`,description:`Replaces your new tab page with a simple React page.`,surfaces:[`newtab`,`background`],framework:`react`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`react`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`jt4HgQPdJX8`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/react`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab to see the React page this template ships`,`Edit src/newtab/NewTabApp.tsx and save to see fast refresh update it`],useCases:[`A new tab page rendered by React`,`React and JSX compiled with no extra config`,`Starting point for React extensions with a new tab`]},{slug:`newtab-react-router`,title:`New Tab React Router`,description:`Replaces your new tab page with a small React app you can navigate across routes.`,surfaces:[`newtab`,`background`],framework:`react`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`react`,`routing`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`ysvv7Q10p3Q`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/react`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab and follow the links to move between routes`,`Add a route under src/newtab/ and it renders with no server`],useCases:[`A multi-route new tab app with client-side routing`,`React Router running inside an extension page`,`Reference for routing with no server under MV3`]},{slug:`newtab-sass`,title:`New Tab Sass`,description:`Replaces your new tab page with a simple styled page.`,surfaces:[`newtab`,`background`],framework:null,css:`sass`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`sass`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`bUWLBJeWzpc`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/sass`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab to see the styled page this template ships`,`Edit src/newtab/styles.scss and save to watch the styles reload`],useCases:[`A new tab page styled with Sass`,`Sass compiled by Extension.js with no extra config`,`Starting point for extensions that prefer Sass to plain CSS`]},{slug:`newtab-svelte`,title:`New Tab Svelte`,description:`Replaces your new tab page with a simple Svelte page.`,surfaces:[`newtab`,`background`],framework:`svelte`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`svelte`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`uq-HVZb51U8`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/svelte`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab to see the Svelte page this template ships`,`Edit src/newtab/NewTabApp.svelte and save to watch it update`],useCases:[`A new tab page rendered by Svelte`,`Svelte components compiled with no extra config`,`Starting point for Svelte extensions with a new tab`]},{slug:`newtab-svelte-router`,title:`Svelte Router New Tab`,description:`Replaces your new tab page with a small Svelte app you can navigate across routes.`,surfaces:[`newtab`,`background`],framework:`svelte`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`svelte`,`routing`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:null,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/svelte`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab and follow the links to move between routes`,`Add a route under src/newtab/routes/ and it renders with no server`],useCases:[`A multi-route new tab app with client-side routing`,`Hash routing with svelte-spa-router inside an extension page`,`Reference for routing with no server under MV3`]},{slug:`newtab-typescript`,title:`New Tab TypeScript`,description:`Replaces your new tab page with a simple page.`,surfaces:[`newtab`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`0sRMGlx7MbA`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/typescript`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab to see the page this template ships`,`Edit src/newtab/scripts.ts and save to watch the tab update`],useCases:[`A typed new tab page`,`TypeScript compiled by Extension.js with no extra config`,`Starting point for TypeScript extensions with a new tab`]},{slug:`newtab-vue`,title:`New Tab Vue`,description:`Replaces your new tab page with a simple Vue page.`,surfaces:[`newtab`,`background`],framework:`vue`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`vue`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`g4rjynbMI5c`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/vue`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab to see the Vue page this template ships`,`Edit src/newtab/NewTabApp.vue and save to watch it update`],useCases:[`A new tab page rendered by Vue`,`Single-file components compiled with no extra config`,`Starting point for Vue extensions with a new tab`]},{slug:`newtab-vue-router`,title:`Vue Router New Tab`,description:`Replaces your new tab page with a small Vue app you can navigate across routes.`,surfaces:[`newtab`,`background`],framework:`vue`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`new-tab`,`vue`,`routing`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:null,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/vue`,firstSteps:[`Run npm run dev to launch the extension`,`Open a new tab and follow the links to move between routes`,`Add a route in src/newtab/router.ts and it renders with no server`],useCases:[`A multi-route new tab app with client-side routing`,`Vue Router running inside an extension page`,`Reference for hash history routing with no server`]},{slug:`playwright`,title:`Playwright E2E Sidebar`,description:`Adds a sidebar panel to the browser, covered end to end by Playwright tests.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`intermediate`,tags:[`testing`,`playwright`,`e2e`,`sidebar`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`k8PP2Gs1AsU`,docsUrl:`https://extension.js.org/docs/workflows/playwright-e2e`,firstSteps:[`Run npm install to set up Playwright deps`,`Run npm run dev to launch the extension`,`Run npm test to execute the Playwright spec against the loaded extension`],useCases:[`End-to-end testing for browser-extension surfaces (popup, sidebar, content)`,`CI-ready Playwright setup wired to Extension.js builds`,`Reference for automating extension flows in headed and headless modes`]},{slug:`preact`,title:`Preact`,description:`Adds a sidebar panel to the browser with a simple Preact page.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:`preact`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`sidebar`,`preact`,`typescript`],icon:`public/logo.svg`,screenshot:`screenshot.png`,video:`VcAPgX8KHgI`,docsUrl:`https://extension.js.org/docs/getting-started/templates/preact`,firstSteps:[`Run npm run dev to launch the extension`,`Click the extension icon to open the Preact sidebar panel`,`Edit the component in src/sidebar/ to see fast refresh update it`],useCases:[`A sidebar panel rendered by Preact`,`Preact and JSX compiled with no extra config`,`Starting point for Preact extensions`]},{slug:`react`,title:`React`,description:`Adds a sidebar panel to the browser with a simple React page.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:`react`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`sidebar`,`react`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`mRgWdPgv1hE`,docsUrl:`https://extension.js.org/docs/getting-started/templates/react`,firstSteps:[`Run npm run dev to launch the extension`,`Click the extension icon to open the React sidebar panel`,`Edit the component in src/sidebar/ to see fast refresh update it`],useCases:[`A sidebar panel rendered by React`,`React and JSX compiled with no extra config`,`Starting point for React extensions`]},{slug:`sidebar`,title:`Sidebar page`,description:`Adds a sidebar panel to the browser with a simple page.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`sidebar`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`bgGUqLiaZFI`,docsUrl:`https://extension.js.org/docs/implementation-guide/html`,firstSteps:[`Run npm run dev to launch the extension`,`Click the extension icon to open the sidebar panel`,`Edit src/sidebar/index.html and save to watch the panel update`],useCases:[`A sidebar panel that stays open while you browse`,`Reading and acting on the page beside it`,`Starting point for sidebar-first extensions`]},{slug:`sidebar-antd`,title:`Sidebar Ant Design`,description:`Adds a sidebar panel to the browser showing Ant Design components.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:`react`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`sidebar`,`react`,`antd`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`7YSGpO-RmVE`,docsUrl:`https://ant.design/docs/react/introduce`,firstSteps:[`Run npm run dev to launch the extension`,`Click the extension icon to open the sidebar panel`,`Swap an Ant Design component in src/sidebar/ to see it update`],useCases:[`A sidebar built from Ant Design components`,`A component library bundled into an extension surface`,`Starting point for extensions with a ready-made design system`]},{slug:`sidebar-monorepo-nx`,title:`Sidebar Nx`,description:`Adds a sidebar panel and shows a small overlay UI on every web page you visit.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`intermediate`,tags:[`sidebar`,`monorepo`,`nx`,`javascript`],icon:null,screenshot:`screenshot.png`,video:`2zuBnmCVvqg`,docsUrl:`https://nx.dev/docs`,firstSteps:[`Run npm install at the workspace root to link the packages`,`Run npm run dev to launch the extension from the workspace`,`Edit the shared package and both the sidebar and the overlay follow`],useCases:[`An extension that lives inside an Nx workspace`,`Sharing code between the extension and other packages`,`Reference for Extension.js in a monorepo with no plugin`]},{slug:`sidebar-monorepo-turborepo`,title:`Sidebar Turborepo`,description:`Adds a sidebar panel and shows a small overlay UI on every web page you visit.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`intermediate`,tags:[`sidebar`,`monorepo`,`turborepo`,`javascript`],icon:null,screenshot:`screenshot.png`,video:`l3Z90k_4c3I`,docsUrl:`https://turborepo.dev/docs`,firstSteps:[`Run npm install at the workspace root to link the packages`,`Run npm run dev to launch the extension from the workspace`,`Edit the shared package and both the sidebar and the overlay follow`],useCases:[`An extension that lives inside a Turborepo workspace`,`Sharing code between the extension and other packages`,`Reference for Extension.js in a monorepo with no plugin`]},{slug:`sidebar-shadcn`,title:`Sidebar shadcn`,description:`Adds a sidebar panel to the browser built with shadcn/ui components.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:`react`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`sidebar`,`react`,`shadcn`,`tailwind`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`gTpQ7v7zSuY`,docsUrl:`https://extension.js.org/docs/integrations/shadcnui`,firstSteps:[`Run npm run dev to launch the extension`,`Click the extension icon to open the sidebar panel`,`Add a shadcn/ui component and save to see it in the panel`],useCases:[`A sidebar built from shadcn/ui components`,`Tailwind and Radix primitives inside an extension surface`,`Starting point for extensions with a modern component kit`]},{slug:`special-folders-pages`,title:`Special Folders: pages/`,description:`Opens a welcome page in a new tab when the extension loads.`,surfaces:[`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`special-folders`,`pages`,`welcome-page`,`javascript`],icon:`src/images/icon-128.png`,screenshot:`screenshot.png`,video:null,docsUrl:`https://extension.js.org/docs/features/special-folders`,firstSteps:[`Run npm run dev to launch the extension`,`A welcome page from src/pages/ opens automatically on install`,`Add another HTML file under src/pages/ and it ships as a separate page`],useCases:[`Onboarding, help, and welcome pages that ship with the extension`,`Standalone HTML routes without manifest plumbing`,`Reference for Extension.js's pages/ special folder convention`]},{slug:`special-folders-scripts`,title:`Special Folders Scripts`,description:`Shows a small overlay on web pages and a toolbar popup that runs the extension's bundled scripts.`,surfaces:[`content`,`action`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:false,difficulty:`beginner`,tags:[`special-folders`,`scripts`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`P8Q8TDQqbQE`,docsUrl:`https://extension.js.org/docs/features/special-folders`,firstSteps:[`Run npm run dev to launch the extension`,`Open any page for the overlay, then click the toolbar icon for the popup`,`Add a file under scripts/ and it ships as its own bundle`],useCases:[`Scripts shared between a popup and a content script`,`Standalone script bundles without manifest plumbing`,`Reference for the scripts/ special folder convention`]},{slug:`svelte`,title:`Svelte`,description:`Adds a sidebar panel to the browser with a simple Svelte page.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:`svelte`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`sidebar`,`svelte`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`RgMo9t-oLL4`,docsUrl:`https://extension.js.org/docs/getting-started/templates/svelte`,firstSteps:[`Run npm run dev to launch the extension`,`Click the extension icon to open the Svelte sidebar panel`,`Edit the component in src/sidebar/ and save to watch it update`],useCases:[`A sidebar panel rendered by Svelte`,`Svelte components compiled with no extra config`,`Starting point for Svelte extensions`]},{slug:`transformers-js`,title:`Transformers.js`,description:`Adds a sidebar panel that classifies the active page or your selected text with on-device AI models.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`intermediate`,tags:[`sidebar`,`ai`,`transformers`,`javascript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`cTxqV5HXXWE`,docsUrl:`https://extension.js.org/docs/languages-and-frameworks/webassembly`,firstSteps:[`Run npm run dev to launch the extension`,`Click the extension icon to open the side panel`,`Type in the text box, or use the page text or your selection, and the model classifies it on your machine`],useCases:[`Running Transformers.js models inside an extension`,`Classifying page text with no server and no API key`,`Reference for shipping on-device AI under MV3`]},{slug:`typescript`,title:`TypeScript`,description:`Adds a sidebar panel to the browser with a simple page.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:null,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`sidebar`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`UX91cqUH2DU`,docsUrl:`https://extension.js.org/docs/getting-started/templates/typescript`,firstSteps:[`Run npm run dev to launch the extension`,`Click the extension icon to open the sidebar panel`,`Edit the typed sources in src/sidebar/ to watch the panel update`],useCases:[`A typed sidebar extension with no compiler config`,`TypeScript compiled by Extension.js out of the box`,`Starting point for TypeScript extensions`]},{slug:`vue`,title:`Vue`,description:`Adds a sidebar panel to the browser with a simple Vue page.`,surfaces:[`content`,`action`,`sidebar`,`background`],framework:`vue`,css:`css`,browsers:[`chrome`,`edge`,`firefox`,`safari`],featured:true,difficulty:`beginner`,tags:[`sidebar`,`vue`,`typescript`],icon:`src/images/icon.png`,screenshot:`screenshot.png`,video:`x55b3Md2zIY`,docsUrl:`https://extension.js.org/docs/getting-started/templates/vue`,firstSteps:[`Run npm run dev to launch the extension`,`Click the extension icon to open the Vue sidebar panel`,`Edit the component in src/sidebar/ and save to watch it update`],useCases:[`A sidebar panel rendered by Vue`,`Single-file components compiled with no extra config`,`Starting point for Vue extensions`]}];const RAW=`https://raw.githubusercontent.com/extension-js/templates/main/examples/`;const REPO=`https://github.com/extension-js/templates/tree/main/examples/`;const browserNames={chrome:`Chrome`,edge:`Edge`,firefox:`Firefox`,safari:`Safari`};const surfaceNames={action:`Action`,background:`Background`,content:`Content`,sidebar:`Sidebar`,options:`Options`,devtools:`DevTools`,newtab:`New Tab`};const frameworkNames={react:`React`,preact:`Preact`,vue:`Vue`,svelte:`Svelte`};const labels={en:{optimizedFor:`Optimized for`,close:`Close`,createProject:`Create project`,useTemplate:title=>`Use the ${title} template to scaffold a new extension project.`,command:`Command`,instructions:`Instructions`,whatToExpect:`What to expect`,jump:`Click to run`,expectation:`Scaffolds this template and opens it in a real browser.`,walkthrough:`walkthrough`,screenshot:`screenshot`,copyAndRun:`Copy \u0026 run`,copy:`Copy`,copied:`Copied`,firstSteps:`First steps`,useItFor:`Use it for`,sourceCode:`Source code`,referenceDocs:`Reference docs`,searchPlaceholder:`Search templates by name, tag, or description`,searchLabel:`Search templates`,featuredOnly:`Featured only`,count:(shown,total)=>`${shown} of ${total} templates`,more:(first,second,rest)=>`${first}, ${second} and ${rest} more`,empty:`No template matches that search.`,emptyFeatured:` Turn off Featured only to search all of them.`},\"zh-Hans\":{optimizedFor:`适配浏览器`,close:`关闭`,createProject:`创建项目`,useTemplate:title=>`使用 ${title} 模板搭建一个新的扩展项目。`,command:`命令`,instructions:`说明`,whatToExpect:`效果预览`,jump:`点击运行`,expectation:`搭建这个模板,并在真实浏览器中打开它。`,walkthrough:`演示`,screenshot:`截图`,copyAndRun:`复制并运行`,copy:`复制`,copied:`已复制`,firstSteps:`第一步`,useItFor:`适用场景`,sourceCode:`源码`,referenceDocs:`参考文档`,searchPlaceholder:`按名称、标签或描述搜索模板`,searchLabel:`搜索模板`,featuredOnly:`仅显示精选`,count:(shown,total)=>`共 ${total} 个模板,显示 ${shown} 个`,more:(first,second,rest)=>`${first}、${second} 等 ${rest+2} 项`,empty:`没有匹配的模板。`,emptyFeatured:`关闭“仅显示精选”即可搜索全部模板。`},\"zh-Hant\":{optimizedFor:`適用瀏覽器`,close:`關閉`,createProject:`建立專案`,useTemplate:title=>`使用 ${title} 範本建立一個新的擴充功能專案。`,command:`指令`,instructions:`說明`,whatToExpect:`效果預覽`,jump:`點擊執行`,expectation:`建立這個範本,並在真實瀏覽器中開啟它。`,walkthrough:`示範`,screenshot:`截圖`,copyAndRun:`複製並執行`,copy:`複製`,copied:`已複製`,firstSteps:`第一步`,useItFor:`適用情境`,sourceCode:`原始碼`,referenceDocs:`參考文件`,searchPlaceholder:`依名稱、標籤或描述搜尋範本`,searchLabel:`搜尋範本`,featuredOnly:`僅顯示精選`,count:(shown,total)=>`共 ${total} 個範本,顯示 ${shown} 個`,more:(first,second,rest)=>`${first}、${second} 等 ${rest+2} 項`,empty:`沒有符合的範本。`,emptyFeatured:`關閉「僅顯示精選」即可搜尋全部範本。`}};const t=labels[locale]||labels.en;const descriptions={\"zh-Hans\":{action:`为浏览器添加一个工具栏弹出窗口,内含一个简单的页面。`,\"action-locales\":`添加一个工具栏弹出窗口,其文字会跟随浏览器的语言。`,\"action-preact\":`为浏览器添加一个工具栏弹出窗口,内含一个简单的 Preact 页面。`,\"action-svelte\":`为浏览器添加一个工具栏弹出窗口,内含一个简单的 Svelte 页面。`,\"action-vue\":`为浏览器添加一个工具栏弹出窗口,内含一个简单的 Vue 页面。`,\"ai-chatgpt\":`添加一个侧边栏面板,让你就正在浏览的页面与 ChatGPT 对话。`,\"ai-claude\":`添加一个侧边栏面板,让你就正在浏览的页面与 Claude 对话。`,\"ai-gemini\":`添加一个侧边栏面板,让你就正在浏览的页面与 Gemini 对话。`,\"ai-perplexity\":`添加一个侧边栏面板,让你就正在浏览的页面与 Perplexity 对话。`,content:`在你访问的每个网页中注入一个小徽标,并附带一个选项页,可把它移到左侧或右侧边缘。`,\"content-css-modules\":`在你访问的每个网页中注入一个带样式的小徽标。`,\"content-custom-font\":`在你访问的每个网页中注入一个以自定义字体渲染的徽标,并附带一个选项页,可开启或关闭该字体。`,\"content-env\":`在你访问的每个网页中注入一个小面板,显示扩展的环境变量值。`,\"content-less\":`在你访问的每个网页中注入一个带样式的小徽标,并附带一个 Less 选项页,可把它移到左侧或右侧边缘。`,\"content-less-modules\":`在每个网页中注入一个带样式的小徽标,并附带一个 Less modules 选项页,可把它移到左侧或右侧边缘。`,\"content-main-world\":`从扩展和页面两个执行环境向每个页面注入一个小界面,并附带一个选项页,可把它移到左侧或右侧。`,\"content-multi-one-entry\":`在你访问的每个网页中注入四个小元素。`,\"content-multi-three-entries\":`在你访问的每个网页中注入四个小元素。`,\"content-preact\":`在网页上显示一个浮层界面,并附带一个选项页,可把它从右侧移到左侧。`,\"content-react\":`在每个网页上显示一个小浮层界面,并附带一个 React 选项页,可把它从右侧移到左侧。`,\"content-sass\":`在你访问的每个网页中注入一个带样式的小徽标,并附带一个 Sass 选项页,可把它移到左侧或右侧边缘。`,\"content-sass-modules\":`在每个网页中注入一个带样式的小徽标,并附带一个 Sass modules 选项页,可把它移到左侧或右侧边缘。`,\"content-svelte\":`在你访问的每个网页上显示一个 Svelte 浮层,并附带一个选项页,可把它从右侧移到左侧。`,\"content-typescript\":`在每个网页上显示一个小浮层界面,并附带一个选项页,可把它从右侧移到左侧。`,\"content-vue\":`在每个网页上显示一个小浮层界面,并附带一个 Vue 选项页,可把它从右侧移到左侧。`,devtools:`为浏览器添加一个开发者工具面板,可读取被检查的页面。`,\"devtools-preact\":`为浏览器添加一个用 Preact 编写的开发者工具面板,可读取被检查的页面。`,\"devtools-react\":`为浏览器添加一个用 React 编写的开发者工具面板,可读取被检查的页面。`,\"devtools-svelte\":`为浏览器添加一个用 Svelte 编写的开发者工具面板,可读取被检查的页面。`,\"devtools-typescript\":`为浏览器添加一个开发者工具面板,可读取被检查的页面。`,\"devtools-typescript-sqlite\":`把被检查页面的网络请求记录到 SQLite,并让你对其进行查询。`,\"devtools-vue\":`为浏览器添加一个用 Vue 编写的开发者工具面板,可读取被检查的页面。`,init:`一个能在浏览器中加载的最小扩展,可直接在其上继续构建。`,javascript:`为浏览器添加一个侧边栏面板,内含一个简单的页面。`,newtab:`用一个可自定义的简单页面替换你的新标签页。`,\"newtab-browser-flags\":`用一个启动页替换你的新标签页,它会打开扩展的侧边栏面板。`,\"newtab-config-eslint\":`用一个简单的页面替换你的新标签页。`,\"newtab-config-prettier\":`用一个简单的页面替换你的新标签页。`,\"newtab-config-stylelint\":`用一个简单的页面替换你的新标签页。`,\"newtab-crypto\":`用一个页面替换你的新标签页,它会用 SHA-256 对你输入的任意文本进行哈希。`,\"newtab-env\":`用一个显示扩展环境变量值的页面替换你的新标签页。`,\"newtab-less\":`用一个带样式的简单页面替换你的新标签页。`,\"newtab-preact\":`用一个简单的 Preact 页面替换你的新标签页。`,\"newtab-preact-router\":`用一个可在多个路由间导航的小型 Preact 应用替换你的新标签页。`,\"newtab-react\":`用一个简单的 React 页面替换你的新标签页。`,\"newtab-react-router\":`用一个可在多个路由间导航的小型 React 应用替换你的新标签页。`,\"newtab-sass\":`用一个带样式的简单页面替换你的新标签页。`,\"newtab-svelte\":`用一个简单的 Svelte 页面替换你的新标签页。`,\"newtab-svelte-router\":`用一个可在多个路由间导航的小型 Svelte 应用替换你的新标签页。`,\"newtab-typescript\":`用一个简单的页面替换你的新标签页。`,\"newtab-vue\":`用一个简单的 Vue 页面替换你的新标签页。`,\"newtab-vue-router\":`用一个可在多个路由间导航的小型 Vue 应用替换你的新标签页。`,playwright:`为浏览器添加一个侧边栏面板,并由 Playwright 测试进行端到端覆盖。`,preact:`为浏览器添加一个侧边栏面板,内含一个简单的 Preact 页面。`,react:`为浏览器添加一个侧边栏面板,内含一个简单的 React 页面。`,sidebar:`为浏览器添加一个侧边栏面板,内含一个简单的页面。`,\"sidebar-antd\":`为浏览器添加一个展示 Ant Design 组件的侧边栏面板。`,\"sidebar-monorepo-nx\":`添加一个侧边栏面板,并在你访问的每个网页上显示一个小浮层界面。`,\"sidebar-monorepo-turborepo\":`添加一个侧边栏面板,并在你访问的每个网页上显示一个小浮层界面。`,\"sidebar-shadcn\":`为浏览器添加一个用 shadcn/ui 组件构建的侧边栏面板。`,\"special-folders-pages\":`扩展加载时在新标签页中打开一个欢迎页面。`,\"special-folders-scripts\":`在网页上显示一个小浮层,并添加一个工具栏弹出窗口来运行扩展打包的脚本。`,svelte:`为浏览器添加一个侧边栏面板,内含一个简单的 Svelte 页面。`,\"transformers-js\":`添加一个侧边栏面板,用设备端 AI 模型对当前页面或你选中的文本进行分类。`,typescript:`为浏览器添加一个侧边栏面板,内含一个简单的页面。`,vue:`为浏览器添加一个侧边栏面板,内含一个简单的 Vue 页面。`},\"zh-Hant\":{action:`為瀏覽器新增一個工具列彈出視窗,內含一個簡單的頁面。`,\"action-locales\":`新增一個工具列彈出視窗,其文字會跟隨瀏覽器的語言。`,\"action-preact\":`為瀏覽器新增一個工具列彈出視窗,內含一個簡單的 Preact 頁面。`,\"action-svelte\":`為瀏覽器新增一個工具列彈出視窗,內含一個簡單的 Svelte 頁面。`,\"action-vue\":`為瀏覽器新增一個工具列彈出視窗,內含一個簡單的 Vue 頁面。`,\"ai-chatgpt\":`新增一個側邊欄面板,讓你就正在瀏覽的頁面與 ChatGPT 對話。`,\"ai-claude\":`新增一個側邊欄面板,讓你就正在瀏覽的頁面與 Claude 對話。`,\"ai-gemini\":`新增一個側邊欄面板,讓你就正在瀏覽的頁面與 Gemini 對話。`,\"ai-perplexity\":`新增一個側邊欄面板,讓你就正在瀏覽的頁面與 Perplexity 對話。`,content:`在你造訪的每個網頁中注入一個小徽章,並附帶一個選項頁,可把它移到左側或右側邊緣。`,\"content-css-modules\":`在你造訪的每個網頁中注入一個帶樣式的小徽章。`,\"content-custom-font\":`在你造訪的每個網頁中注入一個以自訂字型呈現的徽章,並附帶一個選項頁,可開啟或關閉該字型。`,\"content-env\":`在你造訪的每個網頁中注入一個小面板,顯示擴充功能的環境變數值。`,\"content-less\":`在你造訪的每個網頁中注入一個帶樣式的小徽章,並附帶一個 Less 選項頁,可把它移到左側或右側邊緣。`,\"content-less-modules\":`在每個網頁中注入一個帶樣式的小徽章,並附帶一個 Less modules 選項頁,可把它移到左側或右側邊緣。`,\"content-main-world\":`從擴充功能和頁面兩個執行環境向每個頁面注入一個小介面,並附帶一個選項頁,可把它移到左側或右側。`,\"content-multi-one-entry\":`在你造訪的每個網頁中注入四個小元素。`,\"content-multi-three-entries\":`在你造訪的每個網頁中注入四個小元素。`,\"content-preact\":`在網頁上顯示一個浮層介面,並附帶一個選項頁,可把它從右側移到左側。`,\"content-react\":`在每個網頁上顯示一個小浮層介面,並附帶一個 React 選項頁,可把它從右側移到左側。`,\"content-sass\":`在你造訪的每個網頁中注入一個帶樣式的小徽章,並附帶一個 Sass 選項頁,可把它移到左側或右側邊緣。`,\"content-sass-modules\":`在每個網頁中注入一個帶樣式的小徽章,並附帶一個 Sass modules 選項頁,可把它移到左側或右側邊緣。`,\"content-svelte\":`在你造訪的每個網頁上顯示一個 Svelte 浮層,並附帶一個選項頁,可把它從右側移到左側。`,\"content-typescript\":`在每個網頁上顯示一個小浮層介面,並附帶一個選項頁,可把它從右側移到左側。`,\"content-vue\":`在每個網頁上顯示一個小浮層介面,並附帶一個 Vue 選項頁,可把它從右側移到左側。`,devtools:`為瀏覽器新增一個開發者工具面板,可讀取受檢查的頁面。`,\"devtools-preact\":`為瀏覽器新增一個以 Preact 撰寫的開發者工具面板,可讀取受檢查的頁面。`,\"devtools-react\":`為瀏覽器新增一個以 React 撰寫的開發者工具面板,可讀取受檢查的頁面。`,\"devtools-svelte\":`為瀏覽器新增一個以 Svelte 撰寫的開發者工具面板,可讀取受檢查的頁面。`,\"devtools-typescript\":`為瀏覽器新增一個開發者工具面板,可讀取受檢查的頁面。`,\"devtools-typescript-sqlite\":`把受檢查頁面的網路請求記錄到 SQLite,並讓你對其進行查詢。`,\"devtools-vue\":`為瀏覽器新增一個以 Vue 撰寫的開發者工具面板,可讀取受檢查的頁面。`,init:`一個能在瀏覽器中載入的最小擴充功能,可直接在其上繼續打造。`,javascript:`為瀏覽器新增一個側邊欄面板,內含一個簡單的頁面。`,newtab:`以一個可自訂的簡單頁面取代你的新分頁。`,\"newtab-browser-flags\":`以一個啟動頁取代你的新分頁,它會開啟擴充功能的側邊欄面板。`,\"newtab-config-eslint\":`以一個簡單的頁面取代你的新分頁。`,\"newtab-config-prettier\":`以一個簡單的頁面取代你的新分頁。`,\"newtab-config-stylelint\":`以一個簡單的頁面取代你的新分頁。`,\"newtab-crypto\":`以一個頁面取代你的新分頁,它會用 SHA-256 對你輸入的任意文字進行雜湊。`,\"newtab-env\":`以一個顯示擴充功能環境變數值的頁面取代你的新分頁。`,\"newtab-less\":`以一個帶樣式的簡單頁面取代你的新分頁。`,\"newtab-preact\":`以一個簡單的 Preact 頁面取代你的新分頁。`,\"newtab-preact-router\":`以一個可在多個路由間瀏覽的小型 Preact 應用程式取代你的新分頁。`,\"newtab-react\":`以一個簡單的 React 頁面取代你的新分頁。`,\"newtab-react-router\":`以一個可在多個路由間瀏覽的小型 React 應用程式取代你的新分頁。`,\"newtab-sass\":`以一個帶樣式的簡單頁面取代你的新分頁。`,\"newtab-svelte\":`以一個簡單的 Svelte 頁面取代你的新分頁。`,\"newtab-svelte-router\":`以一個可在多個路由間瀏覽的小型 Svelte 應用程式取代你的新分頁。`,\"newtab-typescript\":`以一個簡單的頁面取代你的新分頁。`,\"newtab-vue\":`以一個簡單的 Vue 頁面取代你的新分頁。`,\"newtab-vue-router\":`以一個可在多個路由間瀏覽的小型 Vue 應用程式取代你的新分頁。`,playwright:`為瀏覽器新增一個側邊欄面板,並由 Playwright 測試進行端對端涵蓋。`,preact:`為瀏覽器新增一個側邊欄面板,內含一個簡單的 Preact 頁面。`,react:`為瀏覽器新增一個側邊欄面板,內含一個簡單的 React 頁面。`,sidebar:`為瀏覽器新增一個側邊欄面板,內含一個簡單的頁面。`,\"sidebar-antd\":`為瀏覽器新增一個展示 Ant Design 元件的側邊欄面板。`,\"sidebar-monorepo-nx\":`新增一個側邊欄面板,並在你造訪的每個網頁上顯示一個小浮層介面。`,\"sidebar-monorepo-turborepo\":`新增一個側邊欄面板,並在你造訪的每個網頁上顯示一個小浮層介面。`,\"sidebar-shadcn\":`為瀏覽器新增一個以 shadcn/ui 元件打造的側邊欄面板。`,\"special-folders-pages\":`擴充功能載入時在新分頁中開啟一個歡迎頁面。`,\"special-folders-scripts\":`在網頁上顯示一個小浮層,並新增一個工具列彈出視窗來執行擴充功能打包的腳本。`,svelte:`為瀏覽器新增一個側邊欄面板,內含一個簡單的 Svelte 頁面。`,\"transformers-js\":`新增一個側邊欄面板,用裝置端 AI 模型對目前頁面或你選取的文字進行分類。`,typescript:`為瀏覽器新增一個側邊欄面板,內含一個簡單的頁面。`,vue:`為瀏覽器新增一個側邊欄面板,內含一個簡單的 Vue 頁面。`}};const describe=item=>descriptions[locale]\u0026\u0026descriptions[locale][item.slug]||item.description;const[query,setQuery]=useState(``);const[featuredOnly,setFeaturedOnly]=useState(true);const[openSlug,setOpenSlug]=useState(null);const[tab,setTab]=useState(`command`);const[copied,setCopied]=useState(false);const[flash,setFlash]=useState(false);const closeRef=useRef(null);const commandRef=useRef(null);const active=templates.find(item=>item.slug===openSlug)||null;const track=(action,props)=>{try{const key=Object.keys(localStorage).find(name=>name.startsWith(`ph_`)\u0026\u0026name.endsWith(`_posthog`));const state=key?JSON.parse(localStorage.getItem(key)):null;if(!state||!state.distinct_id)return;fetch(`https://us.i.posthog.com/i/v0/e/`,{method:`POST`,keepalive:true,headers:{\"Content-Type\":`text/plain`},body:JSON.stringify({api_key:key.slice(3,-8),event:`template_action`,distinct_id:state.distinct_id,properties:{$current_url:window.location.href,$host:window.location.host,$pathname:window.location.pathname,$session_id:(state.$sesid||[])[1],$process_person_profile:false,template_action:action,template_locale:locale,...props}})}).catch(()=>{})}catch{}};const open=slug=>{track(`open`,{template_slug:slug});setTab(`command`);setCopied(false);setFlash(false);setOpenSlug(slug);window.history.replaceState(null,``,`#${slug}`)};const close=()=>{setOpenSlug(null);window.history.replaceState(null,``,window.location.pathname+window.location.search)};useEffect(()=>{const slug=window.location.hash.slice(1);if(templates.some(item=>item.slug===slug))setOpenSlug(slug)},[]);useEffect(()=>{if(!openSlug)return undefined;const onKey=event=>{if(event.key===`Escape`)close()};const overflow=document.body.style.overflow;document.body.style.overflow=`hidden`;document.addEventListener(`keydown`,onKey);if(closeRef.current)closeRef.current.focus();return()=>{document.body.style.overflow=overflow;document.removeEventListener(`keydown`,onKey)}},[openSlug]);const iconOf=item=>item.icon?`${RAW}${item.slug}/${item.icon}`:`/favicon.png`;const shotOf=item=>item.screenshot?`${RAW}${item.slug}/${item.screenshot}`:null;const surfacesOf=item=>{const names=item.surfaces.map(key=>surfaceNames[key]||key);if(names.length\u003c=2)return names.join(`, `);return t.more(names[0],names[1],names.length-2)};const commandOf=item=>[`npx extension@latest create my-${item.slug} --template=${item.slug}`,`cd my-${item.slug}`,`npm install`,`npm run dev`].join(`\n`);const copy=text=>{navigator.clipboard.writeText(text).then(()=>{setCopied(true);setTimeout(()=>setCopied(false),1600)})};const needle=query.trim().toLowerCase();const visible=templates.filter(item=>{if(featuredOnly\u0026\u0026!item.featured)return false;if(!needle)return true;return[item.slug,item.title,item.description,describe(item),...item.tags].join(` `).toLowerCase().includes(needle)});const browserRow=item=>_jsxs(`div`,{className:`ext-tpl-browsers`,children:[_jsx(`span`,{className:`ext-tpl-browsers-label`,children:t.optimizedFor}),_jsx(`ul`,{className:`ext-tpl-browsers-row`,children:item.browsers.map(key=>_jsx(`li`,{title:browserNames[key]||key,children:_jsx(`img`,{src:`/images/vendor/${key}.svg`,alt:browserNames[key]||key,loading:`lazy`})},key))})]});const sectionTitle=(text,action)=>_jsxs(`div`,{className:`ext-tpl-section-title`,children:[_jsx(`h3`,{children:text}),_jsx(`span`,{\"aria-hidden\":`true`}),action||null]});const jumpToCommand=()=>{track(`jump`,{template_slug:openSlug});if(commandRef.current){commandRef.current.scrollIntoView({behavior:`smooth`,block:`nearest`})}setFlash(true);setTimeout(()=>setFlash(false),1600)};const dialog=item=>_jsx(`div`,{className:`ext-tpl-overlay`,onClick:close,children:_jsxs(`div`,{role:`dialog`,\"aria-modal\":`true`,\"aria-labelledby\":`ext-tpl-dialog-title`,className:`ext-tpl-dialog`,onClick:event=>event.stopPropagation(),children:[_jsx(`button`,{ref:closeRef,type:`button`,className:`ext-tpl-close`,\"aria-label\":t.close,onClick:close,children:_jsx(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,\"aria-hidden\":`true`,children:_jsx(`path`,{d:`M3 3l10 10M13 3L3 13`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})})}),_jsxs(`header`,{className:`ext-tpl-dialog-head`,children:[_jsx(`img`,{className:`ext-tpl-icon ext-tpl-icon-sm`,src:iconOf(item),alt:``}),_jsxs(`div`,{children:[_jsx(`h2`,{id:`ext-tpl-dialog-title`,children:t.createProject}),_jsx(`p`,{children:t.useTemplate(item.title)})]})]}),_jsx(`div`,{className:`ext-tpl-tabs`,role:`tablist`,children:[[`command`,t.command],[`instructions`,t.instructions]].map(([key,label])=>_jsx(`button`,{type:`button`,role:`tab`,\"aria-selected\":tab===key,className:tab===key?`is-active`:``,onClick:()=>{track(`tab`,{template_slug:item.slug,template_tab:key});setTab(key)},children:label},key))}),tab===`command`?_jsxs(`div`,{className:`ext-tpl-panel`,role:`tabpanel`,children:[sectionTitle(t.whatToExpect,_jsxs(`button`,{type:`button`,className:`ext-tpl-jump`,onClick:jumpToCommand,children:[t.jump,` `,`↓`]})),_jsx(`p`,{className:`ext-tpl-muted ext-tpl-oneline`,children:t.expectation}),_jsx(`div`,{className:`ext-tpl-media`,children:item.video?_jsx(`iframe`,{title:`${item.title} ${t.walkthrough}`,src:`https://www.youtube-nocookie.com/embed/${item.video}?rel=0\u0026playsinline=1`,loading:`lazy`,allow:`encrypted-media; picture-in-picture; fullscreen`,allowFullScreen:true}):_jsx(`img`,{src:shotOf(item),alt:`${item.title} ${t.screenshot}`})}),sectionTitle(t.copyAndRun),_jsxs(`div`,{ref:commandRef,className:flash?`ext-tpl-command is-flash`:`ext-tpl-command`,children:[_jsx(`pre`,{children:_jsx(`code`,{children:commandOf(item)})}),_jsx(`button`,{type:`button`,className:`ext-tpl-copy`,onClick:()=>{track(`copy`,{template_slug:item.slug});copy(commandOf(item))},children:copied?t.copied:t.copy})]})]}):_jsxs(`div`,{className:`ext-tpl-panel`,role:`tabpanel`,children:[sectionTitle(item.title),_jsx(`p`,{className:`ext-tpl-muted`,children:describe(item)}),item.firstSteps.length>0?sectionTitle(t.firstSteps):null,_jsx(`ol`,{className:`ext-tpl-list`,children:item.firstSteps.map(step=>_jsx(`li`,{children:step},step))}),item.useCases.length>0?sectionTitle(t.useItFor):null,_jsx(`ul`,{className:`ext-tpl-list`,children:item.useCases.map(useCase=>_jsx(`li`,{children:useCase},useCase))}),_jsxs(`div`,{className:`ext-tpl-links`,children:[_jsx(_components.a,{href:`${REPO}${item.slug}`,onClick:()=>track(`source`,{template_slug:item.slug}),target:`_blank`,rel:`noreferrer`,children:t.sourceCode}),item.docsUrl?_jsx(_components.a,{href:item.docsUrl,onClick:()=>track(`reference`,{template_slug:item.slug}),target:`_blank`,rel:`noreferrer`,children:t.referenceDocs}):null]})]})]})});return _jsxs(`div`,{className:`ext-tpl`,children:[_jsxs(`div`,{className:`ext-tpl-toolbar`,children:[_jsx(`input`,{type:`search`,className:`ext-tpl-search`,placeholder:t.searchPlaceholder,\"aria-label\":t.searchLabel,value:query,onChange:event=>setQuery(event.target.value)}),_jsxs(`label`,{className:`ext-tpl-featured`,children:[_jsx(`input`,{type:`checkbox`,checked:featuredOnly,onChange:event=>{track(`featured`,{template_featured:event.target.checked});setFeaturedOnly(event.target.checked)}}),t.featuredOnly]})]}),_jsx(`p`,{className:`ext-tpl-count`,\"aria-live\":`polite`,children:t.count(visible.length,templates.length)}),_jsx(`div`,{className:`ext-tpl-grid`,children:visible.map(item=>_jsxs(`article`,{className:`ext-tpl-card`,children:[shotOf(item)?_jsx(`div`,{\"aria-hidden\":`true`,className:`ext-tpl-shot`,children:_jsx(`img`,{src:shotOf(item),alt:``,loading:`lazy`,decoding:`async`})}):null,_jsxs(`div`,{className:`ext-tpl-body`,children:[_jsxs(`div`,{className:`ext-tpl-head`,children:[_jsx(`img`,{className:`ext-tpl-icon`,src:iconOf(item),alt:``,loading:`lazy`}),_jsxs(`div`,{className:`ext-tpl-titles`,children:[_jsx(`h3`,{className:`ext-tpl-name`,children:_jsx(`button`,{type:`button`,className:`ext-tpl-hit`,\"aria-haspopup\":`dialog`,onClick:()=>open(item.slug),children:item.title})}),_jsx(`p`,{className:`ext-tpl-meta`,children:surfacesOf(item)})]}),item.framework?_jsx(`span`,{className:`ext-tpl-pill`,children:frameworkNames[item.framework]||item.framework}):null]}),_jsx(`p`,{className:`ext-tpl-desc`,children:describe(item)}),browserRow(item)]})]},item.slug))}),visible.length===0?_jsxs(`p`,{className:`ext-tpl-empty`,children:[t.empty,featuredOnly?t.emptyFeatured:``]}):null,active?dialog(active):null]})};function _createMdxContent(props){const _components={a:`a`,p:`p`,..._provideComponents(),...props.components},{Icon,OptimizedImage,_MdxComponentBoundary}=_components;if(!Icon)_missingMdxReference(`Icon`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(`div`,{className:`mint-mx-auto mint-flex mint-w-full mint-max-w-6xl mint-flex-col mint-gap-16 mint-px-6 mint-py-16 sm:mint-py-24`,children:[_jsxs(`section`,{className:`mint-flex mint-flex-col mint-items-center mint-text-center mint-gap-6`,children:[_jsx(`div`,{className:`ext-dock-tile plain ext-usedby-logo`,children:_jsx(OptimizedImage,{src:`https://media.extension.land/track/extension-js.png`,alt:`Extension.js`})}),_jsx(`p`,{className:`ext-usedby-eyebrow`,children:`模板`}),_jsx(`h1`,{className:`mint-text-5xl sm:mint-text-6xl mint-font-semibold mint-tracking-tight mint-leading-tight mint-max-w-3xl mint-text-neutral-900 dark:mint-text-white`,children:`为每个浏览器打造作品`}),_jsx(`p`,{className:`mint-text-lg sm:mint-text-xl mint-text-gray-600 dark:mint-text-gray-300 mint-max-w-2xl mint-leading-relaxed`,children:_jsx(_components.p,{children:`从一个现成的扩展开始,复制它的创建命令,项目就会落到你的电脑上。每个模板都能在 Chrome、Edge 和 Firefox 中运行,并可构建到 Safari。`})})]}),_jsx(_MdxComponentBoundary,{name:`TemplatesGallery`,children:_jsx(TemplatesGallery,{locale:`zh-Hans`})}),_jsx(`div`,{className:`ext-footer`,children:_jsxs(`div`,{className:`ext-footer-inner`,children:[_jsx(`div`,{className:`ext-footer-cmd`,children:_jsx(`code`,{children:`npx extension@latest create my-extension`})}),_jsxs(`div`,{className:`ext-footer-right`,children:[_jsxs(`ul`,{className:`ext-footer-links`,children:[_jsx(`li`,{children:_jsxs(`a`,{href:`https://github.com/extension-js/templates`,target:`_blank`,rel:`noreferrer`,children:[_jsxs(_components.p,{children:[`GitHub 上的模板`,` `]}),_jsx(Icon,{icon:`arrow-up-right-from-square`,size:10})]})}),_jsx(`li`,{children:_jsx(_components.a,{href:`/zh-Hans/docs/getting-started/templates`,children:`模板指南`})})]}),_jsx(`p`,{className:`ext-footer-copy`,children:_jsxs(_components.p,{children:[`MIT (c) Cezar Augusto 和`,` `,`\n`,_jsx(_components.a,{href:`/zh-Hans/docs/hall-of-fame`,children:`Extension.js 作者们`}),`。`]})})]})]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{TemplatesGallery,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":"浏览器扩展模板","description":"适用于 Chrome、Edge、Firefox 和 Safari 扩展的起步项目。挑一个模板,复制它的创建命令,几分钟内就能在真实浏览器中运行。","mode":"custom","keywords":["extension.js","templates","browser extension templates","chrome extension template","firefox extension template","react extension template","starter","boilerplate"],"href":"/zh-Hans/templates"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[133,73751,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"dynamicCss":".mint-mx-auto {\n margin-left: auto;\n margin-right: auto\n}\n.mint-flex {\n display: flex\n}\n.mint-w-full {\n width: 100%\n}\n.mint-max-w-2xl {\n max-width: 42rem\n}\n.mint-max-w-3xl {\n max-width: 48rem\n}\n.mint-max-w-6xl {\n max-width: 72rem\n}\n.mint-flex-col {\n flex-direction: column\n}\n.mint-items-center {\n align-items: center\n}\n.mint-gap-16 {\n gap: 4rem\n}\n.mint-gap-6 {\n gap: 1.5rem\n}\n.mint-px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem\n}\n.mint-py-16 {\n padding-top: 4rem;\n padding-bottom: 4rem\n}\n.mint-text-center {\n text-align: center\n}\n.mint-text-5xl {\n font-size: 3rem;\n line-height: 1\n}\n.mint-text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem\n}\n.mint-font-semibold {\n font-weight: 600\n}\n.mint-leading-relaxed {\n line-height: 1.625\n}\n.mint-leading-tight {\n line-height: 1.25\n}\n.mint-tracking-tight {\n letter-spacing: -0.025em\n}\n.mint-text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1))\n}\n.mint-text-neutral-900 {\n --tw-text-opacity: 1;\n color: rgb(23 23 23 / var(--tw-text-opacity, 1))\n}\n.dark\\:mint-text-gray-300:is(.dark *) {\n --tw-text-opacity: 1;\n color: rgb(209 213 219 / var(--tw-text-opacity, 1))\n}\n.dark\\:mint-text-white:is(.dark *) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1))\n}\n@media (min-width: 640px) {\n .sm\\:mint-py-24 {\n padding-top: 6rem;\n padding-bottom: 6rem\n }\n .sm\\:mint-text-6xl {\n font-size: 3.75rem;\n line-height: 1\n }\n .sm\\:mint-text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem\n }\n}","subdomain":"extensionjs","siteName":"Extension.js","title":"浏览器扩展模板 - Extension.js","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/templates","matchLevel":1},"zh-Hans":{"href":"/zh-Hans/templates","matchLevel":0},"zh-Hant":{"href":"/zh-Hant/templates","matchLevel":1}}},"lastModified":"2026-11-27T22:43:33.601Z","originalFileLocation":"zh-Hans/templates.mdx","locale":"zh-Hans"},"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=\"dark\"}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=\"适用于 Chrome、Edge、Firefox 和 Safari 扩展的起步项目。挑一个模板,复制它的创建命令,几分钟内就能在真实浏览器中运行。\">\u003cmeta data-mint-head name=\"application-name\" content=\"Extension.js\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/extensionjs/hqzmAu5S4StlssPO/_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/extensionjs/hqzmAu5S4StlssPO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/extensionjs/hqzmAu5S4StlssPO/_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/extensionjs/hqzmAu5S4StlssPO/_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/extensionjs/hqzmAu5S4StlssPO/_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/extensionjs/hqzmAu5S4StlssPO/_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/extensionjs/hqzmAu5S4StlssPO/_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/extensionjs/hqzmAu5S4StlssPO/_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/extensionjs/hqzmAu5S4StlssPO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"浏览器扩展模板 - Extension.js\">\u003cmeta data-mint-head property=\"og:description\" content=\"适用于 Chrome、Edge、Firefox 和 Safari 扩展的起步项目。挑一个模板,复制它的创建命令,几分钟内就能在真实浏览器中运行。\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Extension.js\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://extension.js.org/zh-Hans/templates\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://media.extension.land/brand/extension-js/social/og.png\">\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=\"浏览器扩展模板 - Extension.js\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"适用于 Chrome、Edge、Firefox 和 Safari 扩展的起步项目。挑一个模板,复制它的创建命令,几分钟内就能在真实浏览器中运行。\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://media.extension.land/brand/extension-js/social/og.png\">\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/extensionjs/hqzmAu5S4StlssPO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Extension.js\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0065e6\">\u003cmeta data-mint-head name=\"og:image:type\" content=\"image/png\">\u003cmeta data-mint-head name=\"og:image:alt\" content=\"Extension.js, the cross-browser extension framework\">\u003cmeta data-mint-head name=\"twitter:creator\" content=\"@extensionjs\">\u003cmeta data-mint-head name=\"twitter:image:alt\" content=\"Extension.js, the cross-browser extension framework\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"BLSk7tcWG_qVtuAAf4UJyUbPIGXfghiJcUaDP4aoGpM\">\u003cmeta data-mint-head name=\"msvalidate.01\" content=\"E718A8AA0D4E3ED605BFF1BA1C0E46A7\">\u003cmeta data-mint-head name=\"yandex-verification\" content=\"e2a6f3f5424c1722\">\u003clink data-mint-head rel=\"canonical\" href=\"https://extension.js.org/zh-Hans/templates\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/zh-Hans/templates.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://extension.js.org/zh-Hans/templates\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://extension.js.org/templates\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://extension.js.org/zh-Hant/templates\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://extension.js.org/templates\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://extension.js.org/#organization\",\"name\":\"Extension.js\",\"url\":\"https://extension.js.org\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/extensionjs/OSsaYW6REekgcRaD/logo-light.png?fit=max\u0026auto=format\u0026n=OSsaYW6REekgcRaD\u0026q=85\u0026s=0eebd66d9a894dd11e16686f9ef4a875\"}},{\"@type\":\"WebSite\",\"@id\":\"https://extension.js.org#website\",\"name\":\"Extension.js\",\"url\":\"https://extension.js.org\",\"publisher\":{\"@id\":\"https://extension.js.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://extension.js.org/zh-Hans/templates#webpage\",\"url\":\"https://extension.js.org/zh-Hans/templates\",\"name\":\"浏览器扩展模板\",\"description\":\"适用于 Chrome、Edge、Firefox 和 Safari 扩展的起步项目。挑一个模板,复制它的创建命令,几分钟内就能在真实浏览器中运行。\",\"dateModified\":\"2026-11-27T22:43:33.601Z\",\"isPartOf\":{\"@id\":\"https://extension.js.org#website\"}},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://extension.js.org/zh-Hans/templates#article\",\"headline\":\"浏览器扩展模板\",\"name\":\"浏览器扩展模板\",\"description\":\"适用于 Chrome、Edge、Firefox 和 Safari 扩展的起步项目。挑一个模板,复制它的创建命令,几分钟内就能在真实浏览器中运行。\",\"url\":\"https://extension.js.org/zh-Hans/templates\",\"mainEntityOfPage\":{\"@id\":\"https://extension.js.org/zh-Hans/templates#webpage\"},\"image\":\"https://media.extension.land/brand/extension-js/social/og.png\",\"dateModified\":\"2026-11-27T22:43:33.601Z\",\"keywords\":\"extension.js, templates, browser extension templates, chrome extension template, firefox extension template, react extension template, starter, boilerplate\",\"publisher\":{\"@id\":\"https://extension.js.org/#organization\"},\"isPartOf\":{\"@id\":\"https://extension.js.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Extension.js\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Extension.js\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/zh-Hans/templates.md","siteName":"Extension.js","nav":{"global":null,"languages":[{"language":"en","default":true,"pages":[{"title":"en","href":"/templates"}]},{"language":"zh-Hans","tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/zh-Hans"}]},{"tab":"Documentation","pages":[{"title":"Documentation","href":"/zh-Hans/docs"}]},{"tab":"Templates","pages":[{"title":"浏览器扩展模板","mode":"custom","href":"/zh-Hans/templates"}]},{"tab":"Showcase","pages":[{"title":"Showcase","href":"/zh-Hans/showcase"}]},{"tab":"AI","pages":[{"title":"AI","href":"/zh-Hans/docs/ai-access"}]},{"tab":"Blog","pages":[{"title":"Blog","href":"/zh-Hans/blog"}]}]},{"language":"zh-Hant","pages":[{"title":"zh-Hant","href":"/zh-Hant/templates"}]}]},"basePath":"","title":"浏览器扩展模板 - Extension.js","deploymentId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","buildId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-lceUjs6n.js","lightbox-handle-r17bVUz3.js"]}