Loading repository data…
Loading repository data…
yosevu / repository
A starter project to build Chrome extensions using React and TypeScript. Ideal for developers looking to create efficient and modern Chrome extensions with a focus on a clean development workflow using Vite and crxjs.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A minimal Chrome extension starter built with React 19, TypeScript, Vite, and Tailwind CSS.
# Clone the template
git clone https://github.com/yosevu/react-chrome-extension-template.git my-extension
cd my-extension
# Run setup wizard
npm run setup
# (resets name/version/manifest to your project)
# Install dependencies
npm install
# Start development
npm run dev
chrome://extensionsdist folder├── options.html # Options page entry
├── src/ # Popup UI
│ ├── App.tsx
│ ├── background.ts # Service worker (background)
│ ├── main.tsx
│ └── options.tsx # Options UI
├── content-script/ # Content script (injected into pages)
│ └── src/
│ ├── App.tsx
│ └── main.tsx
├── lib/ # Shared code
│ ├── components/
│ └── styles/
├── public/
│ └── icons/ # Extension icons (16, 32, 48, 128px)
├── manifest.json # Extension configuration
└── scripts/
└── setup.js # Setup wizard
| Command | Description |
|---|---|
npm run dev | Start development server with HMR |
npm run build | Build for production |
npm run lint | Run ESLint |
npm run setup | Run setup wizard |
Replace the files in public/icons/ with your own icon set:
"icons": {
"16": "icons/icon-16.png",
"32": "icons/icon-32.png",
"48": "icons/icon-48.png",
"128": "icons/icon-128.png"
}
The service worker (src/background.ts) demonstrates a minimal use case:
increment a badge counter for quick visual feedback.
An options page is available at options.html. The popup includes a button
to open it, or you can open it from the extension details page. It also
includes a "Reset badge" button to show background messaging.
This template includes a tiny demo app that touches the core extension pieces:
Quick tour:
Edit manifest.json to change which pages the content script runs on:
"content_scripts": [
{
"matches": ["https://example.com/*"],
"js": ["content-script/src/main.tsx"]
}
]
This template uses activeTab. Add more
permissions to manifest.json as needed:
"permissions": ["storage", "activeTab"]
MIT