A reference plugin for the RNA Browser plugin system. Exercises every public host API so you can verify your build of the host has the plugin SDK wired correctly.
- State Inspector — live JSON of
species,selectedRegion,selectedRNA,channels,favorites,history,highlightRegions. - Navigation tester —
host.navigate({ chr, start, end })andhost.navigate({ transcriptId }). - Highlight tester —
host.highlight.add/remove/clear. - Storage tester — namespaced
host.storage.get/set/remove/keys/clear. - Host info —
host.info(pluginId, version, apiVersion, permissions).
- Drag the prebuilt
plugin-example-diagnostics-<version>.rbp(see Build) into the RBrowser Plugin Store panel — or use Plugin Store → ⚙ → Install from local file… and pick the.rbp. - Toggle to Enabled; the panel mounts on the right side.
This plugin is built with @rbrowser/plugin-sdk (npm) and its companion CLI.
# 1. install deps (React, @rbrowser/plugin-sdk)
npm install
# 2. build the ESM bundle → dist/index.js (~150 KB)
npm run build
# 3. pack into a single .rbp → dist/plugin-example-diagnostics-<version>.rbp
npm run packnpm run pack runs vite build then invokes the SDK CLI (rbrowser-plugin pack), which reads manifest.json + dist/index.js and writes the .rbp archive.
- Add
@rbrowser/plugin-sdkas a dependency. export default definePlugin({ activate?, render, deactivate? }).npm run packto produce a.rbp, drag-install it via Plugin Store.
Your plugin receives a host: RBrowserHost from the loader — never construct your own. See the SDK README on npm for the full host API and CLI reference.