Skip to content

Kirby 6.0.0

Panel Created

The created extension runs your code once when the Panel starts, right after its root component has been created and before the first view is rendered. Your function receives that root component, so you can reach $panel through it (or through window.panel), e.g. to listen to Panel events:

window.panel.plugin("my/plugin", {
  created(app) {
    app.$panel.events.on("model.update", () => {
      // e.g. after content has been saved
    });
  }
});

If your function throws an error, the Panel shows it and keeps loading.