An Obsidian plugin for creating, managing, and reusing interactive widgets with HTML, CSS, and JavaScript. Each widget runs in an isolated Shadow DOM environment so styles and scripts do not affect the rest of the vault.
Plugin ID: obsidget
Used by: Obsidian Nova for its imported widget library.
- Shadow DOM isolation per widget: no style or script leaks.
- Widget state saved inside the Markdown code block; notes stay portable.
- Vault and data access: read/write JSON/CSV files, interact with note frontmatter.
- Template gallery with tagging, search, and Smart Sync for community templates.
- Right-click context menu to insert a widget anywhere.
- Live split-view editor with real-time preview.
- Visual CSS editor: sliders and color pickers for detected CSS variables.
- Self-update from the latest GitHub release without leaving Obsidian.
- Multilingual: English, French, Spanish, German, Portuguese.
// Read a file
const data = await api.readFile("notes/data.json");
// Save widget state (persisted in the code block)
await api.saveState({ count: 5 });
// Access the unique instance ID (for multi-instance widgets)
console.log(api.instanceId);| Setting | Description |
|---|---|
| Gallery Path | Location of .json template files |
| Language | Interface language |
| Max Widget Width | Percentage or pixel limit |
| Update Gallery | Download latest community widgets |
| Update All Widgets | Update all widget code in vault while preserving data |
| Update Plugin | Fetch the latest plugin release from GitHub |
- Fork the repository.
- Add your widget's
.jsonfile to thegallery/directory. - Open a pull request.
npm install
npm run dev # watch mode
npm run buildMIT. See LICENSE.