Template for Roam Depot Clojure based roam/render Plugins Roam Research extension template
This template provides a modern structure for creating Roam Research render components bundled as extensions on the Roam Depot.
-
Update the component name in
src/index.js:const componentName = 'Your Extension Name'; // Update this const version = 'v1';
-
Important: The
componentNameis used to auto-generate a unique window variable to prevent conflicts between extensions. For example:'My Extension'becomeswindow.myExtensionExtensionData'TODO Progress Bar'becomeswindow.todoProgressBarExtensionData
This variable tracks whether your extension is currently running.
-
Update your component logic in
src/component.cljsand styling insrc/component.css -
Build your extension:
npm install npm run build
-
Test by loading the
extension.jsfile into your Roam graph
- Async/await patterns for reliable block creation
- Auto-update functionality - code blocks update when users upgrade versions
- Better error handling with comprehensive logging
- Settings panel with example toggle for strikethrough CSS
- Non-destructive unload - components persist after extension uninstall
src/index.js- Main entry point with onload/onunload hookssrc/entry-helpers.js- Helper functions for block creation/updatessrc/component.cljs- Your ClojureScript render componentsrc/component.css- Component stylingsrc/strikethrough.css- Example of additional CSS modulewebpack.config.js- Webpack configuration
First make sure that User code is enabled in your settings. This allows custom components in your graph.
Easiest way to insert the component is though Roam's native template menu. Simply type ;; and look for EXTENSION NAME HERE
Load up the latest alpha commit using this URL https://8bitgentleman.github.io/

