# Properties Panel - Diagram JS

**URL:** <https://forum.bpmn.io/t/properties-panel-diagram-js/7234>\
**Category:** General\
**Created:** [February 16, 2022, 4:25pm UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234 "2022-02-16T16:25:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjay](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/k/d6d6ee/32.png) [@kjay](https://forum.bpmn.io/u/kjay)\
**Post date:** [February 16, 2022, 4:25pm UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/1 "2022-02-16T16:25:23Z")

</div>

Hi,

I can see the following repo: [https://github.com/bpmn-io/properties-panel](https://github.com/bpmn-io/properties-panel)

I assume this can be used with Diagram-JS to provide a properties panel.

Wondering if there is any example code anywhere to help get started with the diagram-js-editor example?

Thanks,  
Jay.

---

<div class="post-metadata">

**Author:** ![Niklas\_Kiefer](https://forum.bpmn.io/user_avatar/forum.bpmn.io/niklas_kiefer/32/3882_2.png) [@Niklas\_Kiefer](https://forum.bpmn.io/u/Niklas_Kiefer)\
**Post date:** [February 17, 2022, 8:21am UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/2 "2022-02-17T08:21:57Z")

</div>

I think there is no dedicated example for this as of now.

What you could do is to have a look inside how the BPMN properties panel is integrating itself as a diagram-js service: [https://github.com/bpmn-io/bpmn-js-properties-panel/tree/master/src/render](https://github.com/bpmn-io/bpmn-js-properties-panel/tree/master/src/render)

As you see, it is using the `eventBus` to render the properties panel at a certain state.

```auto
eventBus.on('diagram.init', () => {
  if (parent) {
    this.attachTo(parent);
  }
});

eventBus.on('root.added', (event) => {
  const { element } = event;

  this._render(element);
});

```

---

<div class="post-metadata">

**Author:** ![kjay](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/k/d6d6ee/32.png) [@kjay](https://forum.bpmn.io/u/kjay)\
**Post date:** [February 17, 2022, 2:31pm UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/3 "2022-02-17T14:31:09Z")

</div>

Thanks @Niklas_Kiefer

I created a different Renderer and added it to my editor.js.

When loading, I get an error now:

```auto
client:209 ./src/properties-panel/NSDPropertiesPanelRenderer.js 141:6
Module parse failed: Unexpected token (141:6)
You may need an appropriate loader to handle this file type.
| 
| render(
> <PropertiesPanel
| element={ element }
| injector={ this._injector }

```

I assume I need some sort of Provider for this.

Any pointers on what the minimum requirement is for a provider? I’m looking to get the basic skeleton up where I can display an empty properties panel on the canvas.

Thanks,  
Jay.

---

<div class="post-metadata">

**Author:** ![Niklas\_Kiefer](https://forum.bpmn.io/user_avatar/forum.bpmn.io/niklas_kiefer/32/3882_2.png) [@Niklas\_Kiefer](https://forum.bpmn.io/u/Niklas_Kiefer)\
**Post date:** [February 17, 2022, 4:00pm UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/4 "2022-02-17T16:00:51Z")

</div>

Two things

> [@kjay](#):
>
> added it to my editor.js.

How does this look like? Do you use webpack for bundling? The error reveals that you need an loader to support this jsx style.

[Inside our examples](https://github.com/bpmn-io/bpmn-js-examples/blob/master/properties-panel-extension/webpack.config.js#L23), we use `babel-loader` for this.

> I assume I need some sort of Provider for this.

That’s up to your implementation. The idea of providers is an implementation detail of `bpmn-js-properties-panel`. The base `PropertiesPanel` component only requires a property `groups`, which can be an empty array as well.

---

<div class="post-metadata">

**Author:** ![kjay](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/k/d6d6ee/32.png) [@kjay](https://forum.bpmn.io/u/kjay)\
**Post date:** [February 17, 2022, 4:58pm UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/5 "2022-02-17T16:58:32Z")

</div>

@Niklas_Kiefer

Thanks for the link to webpack.

I did have a webpack for bundling but I’ve copied the example you give. I don’t get any compilation errors.

However, the issue is with the \_render method that I’ve copied from BPMNPropertiesPanelRenderer:

> <https://github.com/bpmn-io/bpmn-js-properties-panel/blob/ba559d65865cd22aa5dceba1afe84e9db3909362/src/render/BpmnPropertiesPanelRenderer.js#L143>

I’ve copied this file and using it in my project. Updated the \_render as follows:

```javascript
  _render(element) {
    const canvas = this._injector.get('canvas');

    if (!element) {
      element = canvas.getRootElement();
    }

    if (isImplicitRoot(element)) {
      return;
    }

    render(
      <PropertiesPanel
        element={ element }
        injector={ this._injector }
        getProviders={ this._getProviders.bind(this) }
        layoutConfig={ this._layoutConfig }
        descriptionConfig={ this._descriptionConfig }
      />,
      this._container
    );

    this._eventBus.fire('propertiesPanel.rendered');
  }

```

It doesn’t like the "\<PropertiesPanel…/\>. I have to admit I’m new to this so I don’t have a full grasp of how this is plumbed together.

Appreciate the help on this so far.

---

<div class="post-metadata">

**Author:** ![Niklas\_Kiefer](https://forum.bpmn.io/user_avatar/forum.bpmn.io/niklas_kiefer/32/3882_2.png) [@Niklas\_Kiefer](https://forum.bpmn.io/u/Niklas_Kiefer)\
**Post date:** [February 17, 2022, 5:31pm UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/6 "2022-02-17T17:31:15Z")

</div>

I think you have to notice that [`PropertiesPanel`](https://github.com/bpmn-io/properties-panel/blob/main/src/PropertiesPanel.js) and [`BpmnPropertiesPanel`](https://github.com/bpmn-io/bpmn-js-properties-panel/blob/master/src/render/BpmnPropertiesPanel.js) are two different components with different props, you can’t simply exchange one by another.

The second is simply putting all the things the first one needs together, on top.

---

<div class="post-metadata">

**Author:** ![kjay](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/k/d6d6ee/32.png) [@kjay](https://forum.bpmn.io/u/kjay)\
**Post date:** [February 17, 2022, 7:11pm UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/7 "2022-02-17T19:11:05Z")

</div>

Hi @Niklas_Kiefer

I do notice that and do understand that they’re 2 different components - however, I do not understand why it cannot load the PropertiesPanel.

Please see the following sandbox environment, you can see the source I have:[diagram-js - CodeSandbox](https://codesandbox.io/s/diagram-js-oqbwc)

The files for properties panel are in src/properties-panel/render.

Thanks

---

<div class="post-metadata">

**Author:** ![Niklas\_Kiefer](https://forum.bpmn.io/user_avatar/forum.bpmn.io/niklas_kiefer/32/3882_2.png) [@Niklas\_Kiefer](https://forum.bpmn.io/u/Niklas_Kiefer)\
**Post date:** [February 21, 2022, 2:45pm UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/8 "2022-02-21T14:45:32Z")

</div>

> [@kjay](#):
>
> however, I do not understand why it cannot load the PropertiesPanel.

Thanks for sharing your Sandbox. However, this issue doesn’t pop up there, because your properties panel implementation is nowhere used. Do you have an example that showcases your issue?

---

<div class="post-metadata">

**Author:** ![kjay](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/k/d6d6ee/32.png) [@kjay](https://forum.bpmn.io/u/kjay)\
**Post date:** [February 21, 2022, 4:45pm UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/9 "2022-02-21T16:45:21Z")

</div>

Hi @Niklas_Kiefer,

Apologies, for some reason, the latest file didn’t get uploaded.

Please check now.

Kind Regards,  
Jay.

---

<div class="post-metadata">

**Author:** ![Niklas\_Kiefer](https://forum.bpmn.io/user_avatar/forum.bpmn.io/niklas_kiefer/32/3882_2.png) [@Niklas\_Kiefer](https://forum.bpmn.io/u/Niklas_Kiefer)\
**Post date:** [February 28, 2022, 8:03am UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/10 "2022-02-28T08:03:31Z")

</div>

I’m still not able to reproduce your problem. For me, the output is still blank:

![image](https://forum.bpmn.io/uploads/default/original/2X/c/c7f8138cd4bfc0a0a079a6c5fff6d2de913abee9.png)

Can you provide any example that _directly_ reproduces the issue?

---

<div class="post-metadata">

**Author:** ![kjay](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/k/d6d6ee/32.png) [@kjay](https://forum.bpmn.io/u/kjay)\
**Post date:** [March 1, 2022, 2:35pm UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/11 "2022-03-01T14:35:25Z")

</div>

Hi @Niklas_Kiefer,

Strangely enough - I am unable to reproduce the error on my local environment and on sandbox now.

The only thing that has changed is that my laptop had restarted.

I still cannot get a properties panel to load but I’m no longer getting unexpected Token error.

Thank you for your help and apologies for the wild goose chase!

---

<div class="post-metadata">

**Author:** ![barmac](https://forum.bpmn.io/user_avatar/forum.bpmn.io/barmac/32/974_2.png) [@barmac](https://forum.bpmn.io/u/barmac)\
**Post date:** [July 9, 2025, 10:17am UTC](https://forum.bpmn.io/t/properties-panel-diagram-js/7234/12 "2025-07-09T10:17:23Z")

</div>

Closed on July 9, 2025, 10:17am UTC

Closing old topics.
