Visboard is a production-ready browser annotation extension built with WXT (MV3), Vue 3.5+, strict TypeScript, Pinia state management, Tailwind CSS 4, and a modern neon-themed popup UI.
# 1) Scaffold a WXT project
npx wxt@latest init visboard-extension
# 2) Choose:
# - Framework: Vue
# - Language: TypeScript
# - Manifest: MV3
# 3) Enter the project
cd visboard-extension
# 4) Install dependencies
npm install
# 5) Start development for Chrome
npm run dev:chromewxt.config.ts
- Uses
@wxt-dev/module-vue - Enables Tailwind v4 via
@tailwindcss/vite - Sets MV3 permissions (
storage,activeTab) - Registers command
Ctrl/Cmd + Shift + L
src/
entrypoints/
background.ts # service worker: command + message router
content.ts # injected on <all_urls>: wires tools to storage/messages
popup/
index.html
main.ts
App.vue # popup shell + tool-panel orchestration
components/ # reusable popup UI
layout/PopupHeader.vue
popup/AnnotationToggle.vue
popup/ToolSelector.vue
popup/StatusFooter.vue
ui/ColorSwatch.vue
ui/StepControl.vue
ui/ToggleSwitch.vue
modules/ # per-tool settings panels (popup side)
laser/LaserSettings.vue
pen/PenSettings.vue
shapes/ShapesSettings.vue
stickers/StickersSettings.vue
features/ # page-side tool logic
laser/
config.ts
controller.ts
math.ts
path.ts
pointer.ts
trail.ts
pen/controller.ts
shapes/controller.ts
stickers/controller.ts
tools/tool-manager.ts
shared/
messages.ts
storage.ts
stores/
annotation.ts
styles/
laser-overlay.css
tailwind.css
env.d.tsNote:
features/holds the page-side drawing logic;modules/holds the matching Vue settings panels rendered in the popup.
- Laser pointer with a smooth, self-decaying fading trail (custom
stroke-outline geometry +
requestAnimationFramerender loop) - Pen — persistent freehand drawing with configurable color and width
- Shapes — click-and-drag rectangles, circles, and lines
- Stickers — click to stamp emoji that fade in and auto-expire
- Full-screen SVG overlay blocks page interactions while a tool is active
Escto deactivate the current tool- Master enable gate (
Ctrl/Cmd + Shift + L) — arms the extension without auto-activating any tool - Per-tool toggle shortcuts, customizable from inside the popup (defaults
Ctrl/Cmd + Shift + 1..4); tool shortcuts only work once the extension is enabled ToolManagerarchitecture — only one tool active at a time, easy to extend
- Futuristic glassmorphism panel with neon glow effects
- Visboard branding and logo treatment
- Annotation mode toggle
- Tool selector (laser / pen / shapes / stickers)
- Per-tool settings panel that swaps with an animated transition:
- Laser: color picker
- Pen: color picker + width step control
- Shapes: color picker + shape type (rect / circle / line)
- Stickers: emoji picker from the sticker pack
- Shortcut display + live sync status
src/stores/annotation.tsmanages:- enabled/disabled annotation state
- selected tool
- per-tool settings: laser color, pen color, pen width, shapes color, shapes type, current sticker
src/shared/storage.tsdefines strongly typed storage items:local:annotationEnabledlocal:currentToollocal:laserColorlocal:penColorlocal:penWidthlocal:shapesColorlocal:shapesTypelocal:currentSticker
- The content script uses
storage.watch(...)on these keys, so popup changes propagate live to the active page.
src/shared/messages.tsdefines typed message contracts.- Popup sends state changes through
browser.runtime.sendMessage(...). - Background routes messages to active tab content script.
- Content script applies updates to tool manager and laser controller.
# Start extension dev mode (hot rebuild + extension output)
npm run dev:chrome
# Production build
npm run build
# Optional distributable zip
npm run zip- Open
chrome://extensions/ - Enable Developer mode
- Click Load unpacked
- Select
.output/chrome-mv3/
- Enable the extension (master gate — does not activate a tool by itself):
- Windows/Linux:
Ctrl + Shift + L - macOS:
Command + Shift + L
- Windows/Linux:
- Activate a tool once enabled, either by:
- clicking it in the popup, or
- pressing its keyboard shortcut (default
Ctrl/Cmd + Shift + 1..4)
- Customize a tool's shortcut in the popup: open its settings panel and click the shortcut field, then press your preferred combo (must include Ctrl/Cmd or Alt; conflicts with another tool or the master toggle are rejected)
- Adjust each tool's settings in its panel
- Draw by click + drag (laser, pen, shapes) or click to stamp (stickers)
- Press
Escto deactivate the current tool
MIT