Appearance
BPMN Panel API / Panel Types / NodeCard
Type Alias: NodeCard
ts
type NodeCard = {
title: string;
subtitle: string;
fields: (
| NodeCardField
| NodeCardField[])[];
icon?: string;
};Defined in: features/panels/variants/bpmn/types/panel/graph/node/index.ts:158
Configuration for displaying a node card.
Defines how task nodes appear on the canvas. The card includes title, subtitle, optional icon, and field rows displaying data attributes.
Field Layout System
The fields array supports both single-column and multi-column layouts:
Single-column row: Use
NodeCardFielddirectlyjson{ "key": "status", "label": "Status" }Multi-column row: Use
NodeCardField[]arrayjson[ { "key": "created_at", "label": "Created" }, { "key": "modified_at", "label": "Modified" } ]
Conversion to @mes/bpmn Format
This simplified configuration converts to @mes/bpmn fieldAttrs and labels:
Input (simplified):
json
{
"fields": [
{ "key": "code", "label": "Код" },
[
{ "key": "quantity", "label": "Количество" },
{ "key": "unit", "label": "Ед. изм." }
]
]
}Output (@mes/bpmn format):
typescript
{
fieldAttrs: ["code", ["quantity", "unit"]],
labels: {
code: "Код",
quantity: "Количество",
unit: "Ед. изм."
}
}Examples
Single-column fields
json
{
"title": "{{name}}",
"subtitle": "{{status}}",
"icon": "icon icon--task",
"fields": [
{ "key": "assignee", "label": "Assigned To" },
{ "key": "priority", "label": "Priority" },
{ "key": "dueDate", "label": "Due Date" }
]
}Multi-column fields
json
{
"title": "{{operation}}",
"subtitle": "{{status}}",
"fields": [
{ "key": "code", "label": "Code" },
[
{ "key": "startDate", "label": "Start" },
{ "key": "endDate", "label": "End" }
],
[
{ "key": "quantity", "label": "Qty" },
{ "key": "completed", "label": "Done" },
{ "key": "remaining", "label": "Left" }
]
]
}Template interpolation
json
{
"title": "Operation {{code}}",
"subtitle": "Status: {{status}} | Progress: {{progress}}%",
"fields": [
{ "key": "workCenter", "label": "Work Center" }
]
}Properties
| Property | Type | Description |
|---|---|---|
| Title text displayed on the card. Supports template interpolation using Examples ts ts ts | |
| Subtitle text displayed on the card. Supports template interpolation using Examples ts ts ts | |
( | | Array of field definitions to display on the card. Supports both single-column and multi-column layouts:
The order in the array determines the display order on the card. See NodeCardField for field structure Example json | |
| Optional icon identifier for the card. Icon value influences both the toolbar palette and the node avatar. Toolbar / palette usage (via
Node avatar on canvas (via card.avatar in @orion-front/bpmn):
Examples ts ts ts ts |