A modern browser extension template with sidepanel support, built with WXT + Tailwind CSS 4.0 + shadcn/ui.
- 🖥️ Sidepanel Interface - Click extension icon to open browser sidepanel
- ⚡ WXT Framework - Next-generation Web Extension development framework
- ⚛️ React - Modern UI framework with TypeScript support
- 🎨 Tailwind CSS 4.0 - Latest utility-first CSS framework
- 🛠️ shadcn/ui Ready - Pre-configured for beautiful, accessible React components
- 🌙 Theme Management - System/Light/Dark theme support
- 💾 Local Storage - Persistent data storage with WXT Storage API
- ⚙️ Runtime Configuration - Built-in runtime config system with type safety
- 🔧 TypeScript - Full type safety and developer experience
- 🎯 Modern Development - Hot reload, modern build tools
Watch how the sidepanel extension works: click the extension icon to open the sidepanel interface.
- Node.js 18+
- pnpm (recommended) or npm
-
Clone or use this template
git clone <repository-url> cd sidepanel-extension-template
-
Install dependencies
pnpm install
-
Start development
pnpm dev
-
Load extension in browser
- Open
chrome://extensions/
- Enable "Developer mode"
- Click "Load unpacked extension"
- Select the
.output/chrome-mv3
folder
- Open
- Click the extension icon in the browser toolbar
- The sidepanel will open on the right side
- Start customizing the template for your needs
sidepanel-extension-template/
├── entrypoints/ # Extension entry points
│ ├── background.ts # Background script
│ ├── content.ts # Content script (optional)
│ └── sidepanel/ # Sidepanel UI
│ ├── App.tsx # Main React app
│ ├── index.html # HTML template
│ └── main.tsx # React entry point
├── components/ # React components
│ └── ui/ # shadcn/ui components
├── lib/ # Utility functions
│ └── utils.ts # Common utilities
├── hooks/ # Custom React hooks
│ ├── use-theme.ts # Theme management hook
│ └── use-settings.ts # Settings storage hook
├── assets/ # Static assets
├── public/ # Public assets (icons, etc.)
├── app.config.ts # Runtime configuration
├── components.json # shadcn/ui configuration
├── wxt.config.ts # WXT configuration
└── package.json # Dependencies and scripts
This template is pre-configured for shadcn/ui. To add components:
# Example: Add a button component
pnpm dlx shadcn@latest add button
# Example: Add a dialog component
pnpm dlx shadcn@latest add dialog
The components will be automatically added to components/ui/
with proper styling.
# Development mode with hot reload (Chrome by default)
pnpm dev
# Development for specific browsers
pnpm dev:chrome
pnpm dev:firefox
pnpm dev:edge
pnpm dev:safari
# Build for production (Chrome by default)
pnpm build
# Build for specific browsers
pnpm build:chrome
pnpm build:firefox
pnpm build:edge
pnpm build:safari
# Create extension zip files
pnpm zip
pnpm zip:chrome
pnpm zip:firefox
pnpm zip:edge
pnpm zip:safari
# Type checking
pnpm compile
- Edit
assets/tailwind.css
for global styles - Modify theme colors in
components.json
- Tailwind CSS 4.0 configuration in
wxt.config.ts
- Update manifest permissions in
wxt.config.ts
- Modify extension metadata in
package.json
- Change icons in
public/icon/
- Edit
entrypoints/sidepanel/App.tsx
for main UI - Add new routes/pages as needed
- Extend with additional React components
This extension supports all major browsers through WXT's universal browser compatibility:
- ✅ Chrome (Manifest V3) -
pnpm dev:chrome
,pnpm build:chrome
- ✅ Firefox (Manifest V2) -
pnpm dev:firefox
,pnpm build:firefox
- ✅ Edge (Manifest V3) -
pnpm dev:edge
,pnpm build:edge
- ✅ Safari (Manifest V2) -
pnpm dev:safari
,pnpm build:safari
- ✅ Other Chromium-based browsers (Opera, Brave, etc.)
MIT License - feel free to use this template for your projects!
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Built with ❤️ using WXT, Tailwind CSS, and shadcn/ui