Skip to main content

Notifications

api.notify(message, type?, duration?)

Show a toast notification in the bottom-right corner.

Signature

Returns: HTMLElement β€” the toast element (for manual removal if duration is 0)

Colors

Modals

api.showModal(options)

Open a modal dialog with an overlay.

Signature

Returns: { close: () => void } β€” call close() to dismiss the modal programmatically

Behavior

  • Clicking the overlay (outside the modal) closes it
  • Modal is centered on screen
  • Overlay blocks interaction with the board

Toolbar

api.registerToolbarButton(options)

Add a button to the shared toolbar (fixed at top-center of the screen).
If a button with the same ID already exists, the call is a no-op (no duplicate created).

api.removeToolbarButton(id)

Remove a toolbar button.

api.registerSidebarItem(options)

Add an icon item to the sidebar (fixed at left side of the screen).
Returns: HTMLElement β€” the created sidebar item element

api.removeSidebarItem(id)

Remove a sidebar item.

Context Menu

api.registerContextMenuItem(label, callback)

Add an item to the board’s right-click context menu.
Context menu items are added to a shared menu. The menu auto-closes when clicked.

Keyboard Shortcuts

api.registerShortcut(keys, callback)

Register a keyboard shortcut.

Signature

Returns: () => void β€” call this function to unregister the shortcut
The key part (after the last +) is matched case-insensitively. Modifiers are checked via string parsing.

Full Example