How to use plasmo with a side panel?
I was previously using the tabs folder workaround, but it seems that @lab has added proper support for a sidepanel.tsx file (awesome work Louis). I cannot for the life of me figure out how to get this to work even looking at the example.
Is there something obvious I'm missing?
https://github.com/PlasmoHQ/examples/tree/main/with-sidepanel
GitHub
examples/with-sidepanel at main · PlasmoHQ/examples
🔰 Example projects that demonstrate how to use the Plasmo Framework and integrate with popular tools - PlasmoHQ/examples
8 Replies
@gehrig. has reached level 1. GG!
To add this was trying to manually achieve this off of using
create plasmo
and using pnpm create plasmo --with-sidepanel
. For each when clicking the extension's icon I expect the side panel to open up and display sidepanel.tsx, but nothing happens. No errors are displayed with --verbose.@gehrig. can you inpsect the output manifest.json and paste it here? (in the build/*-dev)
I tested that on brave and chrome, worked doh
Odd. This what you're looking for? I did check and the
sidepanel.html
is being auto generated and referencing the right js file, too. This was with chrome. anyone found a solution?
@The Deviant has reached level 1. GG!
i'm having the exact same problem
did you get to solve it?
Hey folks,
As far as I understood you want to open sidepanel on extension icon click.
This is the official doc: https://developer.chrome.com/docs/extensions/reference/api/sidePanel
Also, I've added following to my background script:
chrome.sidePanel
.setPanelBehavior({ openPanelOnActionClick: true })
.catch((error) => console.error(error));
Oh, and important point, you shouldn't have popup.html file, otherwise it won't workChrome for Developers
chrome.sidePanel  | API  | Chrome for Developers