Transformers.js

Adds a sidebar panel that classifies the active page or your selected text with on-device AI models.

Runs on Chrome, Edge, Firefox · Manifest V3 · Surfaces: sidebar, content script, popup, background service worker · Styling: CSS

Create this project

npx extension@latest create my-transformers-js --template transformers-js
cd my-transformers-js
npm install
npm run dev

Files in this template

  • extension.config.js
  • src/background.js
  • src/constants.js
  • src/content/scripts.js
  • src/images/icon.png
  • src/manifest.json
  • src/sidebar/SidebarApp.js
  • src/sidebar/index.html
  • src/sidebar/sakura.css
  • src/sidebar/scripts.js
  • src/sidebar/styles.css

extension.devDocumentation for extension.dev