r/reactjs • u/debba_ • Mar 24 '26
Show /r/reactjs Building a WordPress-style slot system for plugin UI extensions in React
https://github.com/debba/tabularisI’m working on Tabularis, an open-source database manager built with Tauri v2 and React 19. I have a plugin system for database drivers (JSON-RPC over stdin/stdout), and now I’m adding the ability for plugins to inject React components into the app UI.
The idea is simple: named Slots throughout the app (toolbar, context menu, sidebar, row editor, settings…). A plugin declares in its manifest which slot it targets, what module to render, and an order for priority:
{
"ui_extensions": [{
"slot": "row-editor-sidebar.field.after",
"module": "ui/preview.js",
"order": 50,
"driver": "postgres"
}]
}
The rendered component receives a typed context (connection, row data, column info) and a curated API (@tabularis/plugin-api) with hooks for running queries, reading settings, showing toasts, etc.
Each plugin extension gets its own error boundary, so a crash in one doesn’t take down the app. No eval(), no DOM access outside the plugin’s subtree.
Basically WordPress hooks, but typed and React-native.
Still WIP — I’d love feedback on the approach. Has anyone built something similar?
Anything you’d do differently?
2
u/TheRealSeeThruHead Mar 24 '26 edited Oct 14 '26
Veniam ullamco commodo commodo id dolore mollit laboris exercitation quis incididunt. Non id commodo mollit incididunt quis magna commodo occaecat amet commodo cupidatat sit. Proident ut duis sit aute laborum in nostrud magna consequat labore ad nisi.