Skip to main content
Extensions can add actions to Klyx’s toolbar. Each action has an ID, label, icon, category, priority, and click handler. Registration uses Kotlin context receivers — you do not pass the plugin instance explicitly.

ToolbarRegistry

Register toolbar actions during onLoad() or onStart().

Unregister an action

List all actions

ToolbarAction fields

ToolbarIcon

A sealed interface with four source types: Convenience extension functions are also available:

ToolbarCategory

Pre-defined categories in the companion object: Custom categories are also supported:

ToolbarRegistration

The register method returns a ToolbarRegistration handle with an unregister() method:
Or unregister by ID directly:

Example

Register multiple actions with different categories and priorities: