Skip to content

Contributions

Contributions are declarative UI: tabs, toolbar buttons, HTML blocks, and icons. They are registered with contributionRegistry.registerContribution(target, contribution).

Targets

Contribution targets define where UI appears:

ConstantRole
SIDEBAR_MAINMain sidebar (e.g. file tree).
SIDEBAR_MAIN_BOTTOMBottom of main sidebar.
SIDEBAR_AUXILIARYSecondary sidebar.
EDITOR_AREA_MAINEditor area.
PANEL_BOTTOMBottom panel.
TOOLBAR_MAINMain toolbar.
TOOLBAR_MAIN_RIGHT, TOOLBAR_MAIN_CENTERMain toolbar slots.
TOOLBAR_BOTTOM, TOOLBAR_BOTTOM_END, TOOLBAR_BOTTOM_CENTERBottom toolbar.
SYSTEM_LANGUAGE_BUNDLESi18n language bundles (extensions).

Import these from @kispace-io/core.

Contribution types

  • CommandContributioncommand, label, icon, optional params, showLabel, disabled. Used for toolbar buttons and menu items.
  • TabContributionname, optional editorId, closable, noOverflow, component (function returning a Lit template). Used for sidebar and editor area tabs.
  • PaneContributionname, component, optional size, minSize, maxSize, order. Used for resizable panes.
  • HTMLContributionhtml (string or function returning a Lit TemplateResult). Raw HTML or template in a slot.
  • IconContributionmappings (map of icon keys to identifiers), optional priority.

All contributions can include target, label, icon, slot from the base Contribution interface where applicable.

See Add a sidebar tab and Add a command and toolbar button.