Custom UI in Chrome extension

bestar72

Newbie
Joined
Jun 23, 2025
Messages
2
Reaction score
1
I want to create a custom UI instead of using the default popup in a Chrome extension.

I know it's possible to dynamically insert my UI using a content script, but how can I prevent the UI from disappearing when the page is refreshed?

Is it possible when I use wxt?
 
I want to create a custom UI instead of using the default popup in a Chrome extension.

I know it's possible to dynamically insert my UI using a content script, but how can I prevent the UI from disappearing when the page is refreshed?

Is it possible when I use wxt?
Hello

Yes, with WXT you can create persistent custom UI using content scripts. Use ```createIntegratedUi()``` or ```createShadowRootUi()``` to inject your UI. The UI will disappear on refresh, but you can restore it by:
1. Saving UI state to ```chrome.storage.local``` when shown
2. Checking storage when content script runs after refresh
3. Re-showing UI if it was previously visible

This gives the appearance of persistence across page refreshes
 
Back
Top