Diagram - Copied UI parts

Try live copied UI compositions, then find their imports, providers, bindings and projection slots.

Use these live previews to explore the editor shell, saved-label controls and output controls. Each preview includes its runnable source. The reference tables below describe how to place the same parts in your application.

#Usage

import { Diagram } from '@primeui/vue-diagram';
<Diagram.Root :store="store" page-id="page">
    <Diagram.Viewport label="Review workflow" style="height: 24rem" />
</Diagram.Root>

This skeleton assumes an initialized store with page page. Use First Diagram for model creation, style imports and store disposal.

#UI Composition

PrimeOne and Tailwind parts are editable application source, separate from runtime components. Both presets retain the same public component names. PrimeOne uses PrimeVue controls; Tailwind uses its own controls without a PrimeVue dependency.

This excerpt assumes the setup copy directory, an @/ alias for src/, and an existing model:

import { Diagram } from '@primeui/vue-diagram';
import { DiagramEditorUI, DiagramToolbarUI, DiagramCanvasUI, DiagramInspectorUI } from '@/components/primeui/diagram';
<Diagram.Root :value="model" page-id="page">
    <DiagramEditorUI>
        <template #toolbar><DiagramToolbarUI /></template>
        <template #canvas>
            <DiagramCanvasUI>
                <Diagram.Viewport label="Workflow editor" auto-fit style="height: 32rem" />
            </DiagramCanvasUI>
        </template>
        <template #end><DiagramInspectorUI /></template>
    </DiagramEditorUI>
</Diagram.Root>

DiagramEditorUI places toolbar, utilities, status, start, canvas, and end slots. Its density defaults to 'comfortable'; dir defaults to 'ltr'. It does not create a root, store, or viewport. DiagramCanvasUI wraps the viewport and optional hint.

Copied UI is application source. Runtime parts provide the shared model/session and authoring models; copied parts present them. The tables below describe both PrimeOne and Tailwind. Import paths beginning @ui/diagram mean your configured local copied-source path, not a published runtime package.

#Try the copied editor

Insert a shape from the palette, select it, then change its name or position in the inspector. Undo restores the edit. The toolbar, palette, canvas, inspector and page/layer controls all share one Diagram root and model history.

Loading Demo...

This preview uses the PrimeOne copied parts. The Tailwind preset exposes the same parts and bindings with HTML-based controls. See Editor composition to replace a panel or omit regions, and Theming to adapt their appearance.

#Imports and required context

The Diagram namespace and flat parts export the base runtime root, viewport, node/connector rendering, node definitions, field/port adapters, commands and overlays. Palette, layout, output and semantic notation parts use their optional public entries. Diagram.WorkspaceHost is a separate part in the base runtime.

The local base barrel exports the copied widgets below, including palette, workspace, inspector sections and persistence controls. Output, layout, swimlane and notation widgets use separate local entries.

AuthorityRequired ancestor / provider
Toolbar, view, overview, explorer and commandsDiagram.Root; overlay controls share its overlay authority.
Generic inspector sectionsRoot-provided selection inspector, read through useDiagramSelectionInspector().
Pages/LayersDiagramWorkspaceUI or explicit Diagram.WorkspaceHost.
Palette/palette runtime, collection, registry and explicit viewport placement target.
Node content and saved fieldsMounted node context inside a definition; DiagramNodeContentUI creates no provider.
Shell, sidebar, canvas and statusPresentation only; context comes from hosted content.
PersistenceStore, controller, loader and saver, under the persistence host.
Notation inspectorMatching optional semantic root beneath the Diagram root.

PrimeOne imports PrimeVue and @primeicons/vue; Tailwind uses themed HTML and its local select helper. Both need the shared Diagram structure/theme CSS. Pass an empty hint to DiagramCanvasUI to omit its caption when guidance already appears outside the drawing.

#Base copied families

These components come from the local base barrel. Root services must be available above consumers.

FamilyComponentsState source
Editor shellDiagramEditorUI, DiagramSidebarUI, DiagramCanvasUILayout and application slots.
ToolbarDiagramToolbarUI, DiagramToolsUI, DiagramConnectionPathUI, DiagramDrawingUIRoot toolbar service.
Selection inspectorDiagramInspectorUI, DiagramTransformUI, DiagramArrangeUI, DiagramLabelUI, DiagramConnectorPropertiesUIRoot selection inspector.
Saved labelsDiagramLabelListUI, DiagramLabelPropertiesUISame selection inspector and selected label identity.
ViewDiagramViewControlsUI, DiagramZoomControlsUI, DiagramAidsUI, DiagramOverviewUICurrent root/session.
ExplorerDiagramExplorerUIRoot explorer service.
ActionsDiagramQuickActionsUI, DiagramSelectionActionsUI, DiagramCommandGroupUI, DiagramContextActionsUIRoot commands and current availability.
Tooltip and statusDiagramTooltipUI, DiagramStatusUIRuntime overlay or root presentation state.
Node bodyDiagramNodeContentUINode context inside a node definition.
WorkspaceDiagramWorkspaceUI, DiagramPagesUI, DiagramLayersUIWorkspace host for the split controls.
PersistenceDiagramPersistenceUI, DiagramPersistenceActionsUI, DiagramPersistenceImportUI, DiagramPersistenceStatusUIPersistence host for the split controls.
PaletteDiagramPaletteUI, DiagramPaletteFiltersUI, DiagramPaletteItemsUI, DiagramPalettePagerUI, DiagramPaletteFeedbackUIPalette root for the split controls.
Copied componentProps, emits and defaults
DiagramCanvasUIhint='Drag nodes to move · drag a handle to resize · use Connect to link'; pass '' to omit.
DiagramPersistenceUIRequired store, controller, loader, saver; readOnly=false, persistedDirty=undefined.
DiagramEditorUIdensity='comfortable' (comfortable/compact), dir='ltr' (ltr/rtl).
DiagramExplorerUIRequired canvas: DiagramViewportHandle, used to restore canvas focus after reveal.
DiagramTransformUI, DiagramArrangeUI, DiagramLabelUI, DiagramConnectorPropertiesUI, DiagramInspectorUI, DiagramOverviewUI, DiagramLabelListUI, DiagramLabelPropertiesUINo host props; consume the shared selection/view model.
DiagramNodeContentUIalign='center'; supports center/start.
DiagramPaletteUIRequired collection, registry, target: DiagramPaletteTargetHandle; title='Shapes', showStatus=true.
DiagramCommandGroupUIlabel='Diagram commands', commandIds=['undo','redo','fit'], size=undefined (standard; optional small/large).
DiagramContextActionsUIlabel='Diagram quick actions', commandIds=['duplicate','delete','front','back','copy','cut','paste','undo','redo','fit'].
DiagramQuickActionsUIselectionCommandIds=['duplicate'], menuCommandIds uses that context-action list, menuLabel='Diagram quick actions'.
DiagramSelectionActionsUIcommandIds=['duplicate'].
DiagramSidebarUIRequired title; collapsible is off when omitted; named v-model:collapsed starts false.
DiagramStatusUImessage='Ready', pending=false, diagnostics=[].
DiagramToolbarUItitle='Workflow editor', drawingOptions=[]; each choice is { label, spec: DiagramDrawingSpec }.
DiagramViewControlsUI, DiagramAidsUIRequired aidOptions; emit aidOptionsChange. Bind emitted options to both root and controls.
DiagramPagesUI, DiagramLayersUINo host props; require one workspace host.
DiagramWorkspaceUIRequired activeLayerId; emits pageChange and layerChange.

#Independently placed controls

The complete toolbar, view controls, palette and persistence panel compose individual parts from the same local base entry. Use them independently to choose placement without copying command or persistence logic.

DiagramWorkspaceUI creates its workspace host from activeLayerId and emits pageChange and layerChange. The application adopts the selected page/layer. For independently placed page/layer controls, supply one Diagram.WorkspaceHost above them.

DiagramPersistenceUI creates its host from store, controller, loader, saver, and optional read-only/dirty inputs. The application owns the controller. Split persistence controls belong under one Diagram.PersistenceHost.

DiagramPaletteUI takes collection, registry, and a placement target and creates its palette root. Split filters, items, pager, and feedback belong under a shared DiagramPaletteRoot from /palette. A destination target does not create workspace state. See Palette.

Individual widgets use their host’s surrounding panel spacing. Fixture switches, reset buttons and approval simulations belong to the example or application; they are not copied product parts.

Independent componentChoices, feedback and authority
DiagramToolsUISelect/Pan/Connect through the root toolbar model.
DiagramConnectionPathUIPath choice for future connections through the same model.
DiagramDrawingUIdrawingOptions=[]; { label, spec } choices. Empty means no drawing control.
DiagramZoomControlsUIZoom out/in, percentage and Fit through the toolbar model.
DiagramTooltipUIRoot tooltip behavior; replaceable default-slot content in copied chrome.
DiagramPaletteFiltersUISearch/category under the shared palette root.
DiagramPaletteItemsUItitle='Shapes'; optional item and empty scoped slots replace their default presentation.
DiagramPalettePagerUISame palette root; appears only with multiple result pages.
DiagramPaletteFeedbackUISame palette root; optional default scoped slot supplies status content.
DiagramPersistenceActionsUISave/load/retry/cancel under the shared persistence host.
DiagramPersistenceImportUINative JSON textarea/import action under that host.
DiagramPersistenceStatusUIOne polite live status for that model.

#Projection and readable state

PartVue slots / readable authority
DiagramEditorUINamed toolbar, utilities, status, start, canvas, end; no catch-all region.
DiagramSidebarUIactions in the heading; default body stays mounted while collapsed. Named v-model:collapsed.
DiagramNodeContentUIheader, default body and footer; align is 'center' or 'start'.
DiagramCanvasUIDefault content before the optional hint.
DiagramToolbarUIDefault application controls alongside supplied controls.
DiagramInspectorUIDefault content appends after generic controls/status; compose independent sections to replace them.
DiagramPaletteUIitem, empty, status and default slots; payloads come from the runtime owner.

Workspace/Pages/Layers and Explorer keep management dialogs, query/paging and drafts in their copied part and shared model. They do not expose universal field-replacement slots. PrimeOne uses PrimeVue Dialog; Tailwind uses native dialogs. Dismissal returns focus to the invoking Manage button. Saved actions still use workspace authority and Undo history.

Script-setup locals are implementation details, not exposed instance members. Custom children read the documented service accessors and invoke their bound actions. Keep feedback, pending reconciliation and command results separate from saved node data.

#Optional copied families

Local entryPurposeRuntime entry
@/components/primeui/diagram/layoutLayout controls.@primeui/vue-diagram/layout
@/components/primeui/diagram/swimlanePool/lane/phase controls.Main runtime.
@/components/primeui/diagram/bpmnBPMN inspector sections./bpmn
@/components/primeui/diagram/umlUML Class inspector sections./uml
@/components/primeui/diagram/erER inspector sections./er
@/components/primeui/diagram/activityActivity inspector sections./activity
@/components/primeui/diagram/sequenceSequence inspector sections./sequence
@/components/primeui/diagram/bpmn-xmlBPMN XML review/import/export controls./bpmn-xml
@/components/primeui/diagram/outputOutput settings, actions, and status./export

Paths are local examples, not package imports. Keep supporting helper files when extracting a component. Optional semantic inspectors need their matching notation provider and store module, independently of their visual symbols.

Copied componentProps, emits and defaultsAuthority
DiagramBpmnInspectorUI, DiagramUmlInspectorUI, DiagramErInspectorUI, DiagramActivityInspectorUI, DiagramSequenceInspectorUIForward entityId to their runtime inspector host; each host accepts optional string or null.Matching semantic root/store module.
DiagramLayoutSettingsUIRequired layout: InstanceType<typeof DiagramLayout> and options; emits optionsChange, runRequested; delegateRun=false, runDisabled=false, scopeDisabled=false, pinId=undefined, pinLabel='node', scopes=[]; directions Down/Right/Up/Left (RTL).Explicit public layout component handle.
DiagramSwimlanePropertiesUIRequired lane, laneOptions: readonly { id, name }[], size; optional minSize, maxSize; applyDisabled=false, applyReason=''; emits laneChange, sizeChange, applySize.Host-owned selection/size and public swimlane commands.
DiagramOutputUIbaseOptions={} and filename='diagram' through its host; optional source.Root context and /export transports.

DiagramLayoutSettingsUI's optional pinId names a saved pin target. Its directions accept { label, value: DiagramLayoutDirection } choices; scopes accept { label, value: string }. Bind optionsChange back to the options owner. With delegateRun=true, Run emits runRequested; otherwise it calls the supplied layout handle's run(). Scope and Run disabled flags are independent. Run also disables while running; Cancel calls that handle's cancel().

DiagramSwimlanePropertiesUI owns no pool. The host binds lane choices, selected lane, draft size, min/max and current Apply availability/reason. On applySize, execute the public lane-update command. Both presets emit sizeChange after their numeric input accepts a finite in-range value; keep the draft reconciled with saved size after canvas edits and history. Lane search is available in both presets. This form does not bypass swimlane ownership or permissions.

Notation forms retain typed fields, drafts, supported-operation checks and their semantic root's feedback. Bind a supported saved ID explicitly. Vue normalizes omitted/null entityId to null: BPMN can resolve the current selected entity and also offers page catalogs; the other forms require an explicit target. Null is not a universal current-selection form. Semantic roots default showDefaultStatus=true; set it false only when your composition presents the status/warnings itself. Use the public inspector hosts with the copied sections for replacement forms. The matching optional runtime entry exports the semantic root and inspector host.

#Compose notation sections

The complete Diagram{Notation}InspectorUI remains available and supplies its inspector host. To choose sections independently, mount the matching runtime inspector host under its notation root, then compose the copied sections and status below it.

FamilyRuntime entryIndependently exported sections
BPMN/bpmnDiagramBpmnCategoriesUI, DiagramBpmnDataDefinitionsUI, DiagramBpmnClassificationUI, DiagramBpmnEventsUI, DiagramBpmnActivityUI, DiagramBpmnRoutingUI, DiagramBpmnConnectionsUI, DiagramBpmnStatusUI
UML Class/umlDiagramUmlClassifierUI, DiagramUmlMembersUI, DiagramUmlRelationshipUI, DiagramUmlRelationshipEndsUI, DiagramUmlStatusUI
ER/erDiagramErEntityUI, DiagramErFieldsUI, DiagramErRelationshipUI, DiagramErRelationshipEndsUI, DiagramErStatusUI
Activity/activityDiagramActivityNodeUI, DiagramActivityConnectionsUI, DiagramActivityNodeProfileUI, DiagramActivityScopeUI, DiagramActivityPinsUI, DiagramActivityStatusUI
Sequence/sequenceDiagramSequenceIdentityUI, DiagramSequenceFragmentUI, DiagramSequenceMessageUI, DiagramSequenceExecutionUI, DiagramSequenceTransferUI, DiagramSequenceStatusUI

Bind supported record IDs explicitly for custom inspectors. The semantic store module validates edits; a visual symbol registry does not install notation semantics. Generic selection forms cannot infer domain fields. Keep status and completeness warnings visible when replacing default presentation.

#Optional import panels

BPMN XML review/import/export controls live in the local bpmn-xml entry and use @primeui/vue-diagram/bpmn-xml. The application supplies the store/session and owns any approval workflow. Parse into a detached preview, inspect diagnostics, then explicitly accept or reject the import. A preview alone does not mutate the saved graph.

The matching runtime transport owns operation state and cancellation. Keep copied controls under that authority rather than constructing another editable graph. See BPMN XML.

#Inherited model state and actions

Service accessorReadable state and mutation boundary
useDiagramToolbar()Tool, connection path, drawing choices, selection and command availability; run commands and use public setters.
useDiagramSelectionInspector()Selection, labels, transform, connector choices and status; use typed edit actions and their canonical outcomes.
useDiagramExplorer()Current graph navigation, query/paging and focus; use its navigation actions.
useDiagramWorkspace()Pages, layers, drafts and availability under the workspace host; request navigation through the application owner.
useDiagramPersistence()Dirty/checkpoint and operation state under the persistence host; controller remains application-owned.
useDiagramPalette()Reconciled collection, query, category, paging and feedback under the palette root.
useDiagramOutput()Format, scope, color/background, export/print status and actions under the output host.
Notation inspector accessorReadonly semantic state and supported actions beneath its matching root/inspector host.

All snapshots are readonly. Read refs with .value in setup and destructure top-level refs for template unwrapping. Use flat setter actions instead of assigning to model refs. Local UI named models do not make the root’s value a two-way binding. Pending/rejected edits retain canonical saved state.

The following inventories name the public accessor members available to custom children. State refs use .value in setup; choice arrays and other plain values are read directly. Callable members keep parentheses. Use the existing setters for presentation choices and the returned canonical results for saved edits.

Model via its accessorReadonly refs and valuesCallable actions and queries
DiagramWorkspaceModelactiveLayerId, feedback, drafts, pageId, model, pages, layers, currentPage, currentLayer, pageOptions, layerOptions, relocationOptions, requestedRelocation, chosenRelocation, hasPending, pageHasContent, layerHasContentsetRequestedRelocation(), pageChange(), layerChange(), draftValue(), setDraft(), available(), reason(), selectPage(), selectLayer(), addPage(), renamePage(), removePage(), addLayer(), renameLayer(), setVisibility(), setLock(), moveLayer(), removeLayer(), canRemovePage(), canAddPage(), canRenamePage(), canAddLayer(), canRenameLayer(), canSetVisibility(), canSetLock(), canRemoveLayer(), canMoveLayer()
DiagramPersistenceModelstore, controller, loader, saver, readOnly, persistedDirty, state, dirty, pending, busy, canRetry, messagesave(), load(), import(), retry(), cancel()
DiagramSelectionInspectorModelstatus, selectedCount, selection, node, connector, connectorPathTypes, decoratorTypes, sourceDecoratorOptions, targetDecoratorOptions, selectionSummary, selectedLabelId, labelOwner, labelOptions, selectedLabel, chosenLabelId, labelBusy, labelAlignmentOptions, labelVerticalAlignmentOptions, labelLayoutOptions, labelOrientationOptions, labelStackingOptionscan(), canContent(), worldPosition(), displayNumber(), apply(), setName(), setCoordinate(), setSize(), setRotation(), canSelection(), applySelection(), canConnectorPath(), resetConnectorPath(), canReconnect(), startReconnect(), setConnectorPath(), canConnectorDecorator(), setConnectorDecorator(), selectLabel(), canSelectedLabel(), labelValue(), setSelectedLabelProperty(), selectedLabelProperty(), canConnectorLabel(), canNodeLabel(), setNodeLabel(), nodeLabel(), setConnectorLabel(), connectorLabel(), rename(), coordinate(), size(), rotation()
DiagramOutputModelbaseOptions, source, filename, format, scope, scale, background, colorScheme, paper, orientation, status, diagnostics, svgExport, rasterExport, printExport, transportsReady, busy, printState, printError, canCancel, formatChoices, outputScopeChoices, scaleChoices, backgroundChoices, colorSchemeChoices, paperChoices, orientationChoices, model, pageId, selectedIds, pageOptions, downloadPage, chosenDownloadPage, options, rasterOptions, printOptionssetColorScheme(), setBackground(), setScale(), setDownloadPage(), setOrientation(), setPaper(), createOutput(), downloadOutput(), cancelOutput(), openPrintPreview(), setFormat(), setScope(), cancel(), create(), download(), downloaded(), printRequested(), printClosed()
DiagramExplorerModelsearch, offset, feedback, pageSize, result, selected, contextsetSearch(), next(), previous(), select(), reveal()
DiagramBpmnInspectorModelentityId, readOnly, pageDisabled, disabled, feedback, warnings, drafts, newDefKind, newIoDirection, sideChoice, newDefinitionKind, definitionKindChoices, ioDirectionChoices, dataKindChoices, orderingChoices, gatewayModeChoices, envelopeChoices, categoryChoices, categoryValueChoices, dataDefinitionChoices, itemChoices, ioChoices, eventDefinitionChoices, callableChoices, categoryId, categoryValueId, dataDefinitionId, itemId, ioId, eventDefinitionId, entity, node, flow, catalog, categories, activeCategory, activeCategoryValue, activeDataDefinition, activeItem, activeIO, activeEventDefinition, activeCategoryId, activeCategoryValueId, activeDataDefinitionId, activeItemId, activeIOId, activeEventDefinitionId, groupMembers, subprocesses, boundaryTriggers, sides, activity, callablePages, loopModes, kinds, positions, tasks, gateways, directions, definitionKindssetNewIoDirection(), setIoId(), setCategoryValueId(), setItemId(), setNewDefKind(), setDataDefinitionId(), setNewDefinitionKind(), setEventDefinitionId(), setSideChoice(), draftValue(), setDraft(), options(), chooseCategory(), interrupting(), collapsed(), compensationEnabled(), cancelRemainingEnabled(), instantiateEnabled(), addCategory(), renameCategory(), removeCategory(), addCategoryValue(), removeCategoryValue(), saveCategoryValue(), bindGroup(), captureGroup(), selectGroupMembers(), duplicateGroup(), saveCatalog(), definitionName(), storeCapacity(), toggleItemCollection(), removeDataDefinition(), removeItem(), addItem(), addDataDefinition(), dataKind(), reference(), duplicateReference(), processIO(), saveIO(), removeIO(), clearIO(), renameIO(), associationIO(), subprocessChange(), collapse(), toggleInterrupting(), boundaryTrigger(), placeBoundary(), selectedLoop(), loopMode(), setLoop(), standardLoop(), multiLoop(), callTarget(), scriptProperties(), ruleImplementation(), adHocOrdering(), adHocCompletion(), adHocCancel(), triggers(), kindChange(), eventPosition(), eventTrigger(), compensationActivity(), definitionText(), addDefinition(), removeDefinition(), clearDefinitions(), definitionDetail(), linkProperties(), clearLink(), compensationTarget(), associateHandler(), taskChange(), gatewayChange(), gatewayInstantiate(), eventGatewayMode(), gatewayActivation(), setDefault(), messageDisplay(), conditionChange(), directionChange(), canonicalSelect()
DiagramUmlInspectorModelentityId, readOnly, disabled, feedback, warningCount, drafts, compartmentId, rowId, activeCompartment, activeCompartmentId, activeRow, activeRowId, activeRowIndex, visibilities, visibilityChoices, classifier, relationshipKinds, relationshipChoices, ends, compartmentChoices, rowChoices, relationshipsetRowId(), setCompartmentId(), draftValue(), setDraft(), relationshipKind(), relationshipEnd(), navigate(), setNavigable(), rename(), abstract(), setAbstract(), collapse(), rowRename(), attribute(), returnTypeChange(), visibilityChange(), flag(), setFlag(), addParameter(), parameterChange(), removeParameter(), move(), remove(), add()
DiagramErInspectorModelentityId, readOnly, disabled, feedback, warningCount, drafts, fieldId, activeField, activeFieldId, activeFieldIndex, flags, kinds, kindChoices, ends, cardinalities, cardinalityChoices, entities, bindingOptions, bindingChoices, fieldChoices, entity, edge, relationshipsetFieldId(), draftValue(), setDraft(), rename(), collapse(), fieldText(), toggle(), setFieldFlag(), move(), remove(), add(), renameRelationship(), relationshipKind(), roleChange(), cardinalityChange(), currentBinding(), bindChoice(), bind()
DiagramActivityInspectorModelentityId, readOnly, disabled, feedback, warningCount, warnings, drafts, pinId, activePin, nodeChoices, noteChoices, scopeChoices, kinds, kindChoices, flowChoices, directionChoices, triggerChoices, orientationChoices, pinChoices, nodeOptionChoices, noteOptionChoices, scopeOptionChoices, flowBindingChoices, data, node, flow, handler, annotation, nodessetPinId(), draftValue(), setDraft(), nodeLabel(), triggerText(), relativeTime(), signalDetails(), eventDetails(), partitionDetails(), noteText(), moveScope(), handlerDetails(), annotationDetails(), ownership(), rename(), objectText(), pinPolicy(), canConvert(), convert(), addPin(), removePin(), move(), binding(), applyFlow()
DiagramSequenceInspectorModelentityId, readOnly, disabled, feedback, warningCount, warnings, drafts, operandId, activeOperand, sorts, operators, sortChoices, operatorChoices, profileChoices, scopes, record, data, lifelines, occurrences, scopeChoices, defaultScope, lifelineChoices, occurrenceChoices, operandChoicessetOperandId(), draftValue(), setDraft(), optionLabel(), semanticLabel(), bounds(), column(), end(), participant(), interaction(), message(), execution(), occurrence(), fragment(), operand(), addOperand(), reorder(), transfer(), remove()

#Tailwind select and helpers

Tailwind’s copied DiagramSelectUI accepts options, value, label, optional disabled and searchable, and emits valueChange. It owns accessible keyboard/typeahead, popover placement and dismissal. Keep the select and supporting files referenced by extracted controls. PrimeOne uses PrimeVue controls with their normal dependency setup.

DiagramSelectUI is a direct Tailwind helper at select/DiagramSelectUI.vue; the Vue base barrel does not export it. Import that local file directly. Required label, value and options: readonly { label, value, disabled? }[] describe the control; disabled=false and searchable=false. Set searchable=true for its filter input. Open/query/active state is internal setup state. The helper uses Vue useId() for list IDs, so it needs no Diagram root or ID provider. Keep its keyboard/typeahead, list focus, Escape and outside dismissal behavior when extracting it. PrimeOne's select helper wraps PrimeVue instead.

#Exact member contracts

Use the Vue API for runtime props, emits, slots, handles, context keys and public service types. The copied .vue file declares its own props, named models and slots. Read those declarations when replacing a widget; internal setup refs are not a public component handle.

The compound namespace and flat runtime parts share context identity. Optional components come from their capability entry rather than being added to Diagram.*. The Imports page maps those entries.

#Compose output and saved-label controls

Import saved-label controls from the local base entry and output controls from the local output entry. Saved-label controls share the root’s selection inspector. Output controls share an output host and its current root/source.

DiagramOutputUI is the complete local starter and creates its own output host. For independent placement, put the following local parts under one DiagramOutputHost from @primeui/vue-diagram/export.

PartResponsibility
DiagramOutputFormatScopeUIFormat and page, selection, or all-pages scope.
DiagramOutputExportSettingsUIScale, color scheme, background, and SVG download choice.
DiagramOutputPrintSettingsUIPaper and orientation.
DiagramOutputActionsUICreate, download, print, and cancel actions.
DiagramOutputStatusUIOutcome, print error, and diagnostics.

The host accepts filename, baseOptions, and optional source. Its accessor exposes readonly output snapshots and actions. Preserve visible accessible status when replacing a supplied part. A rooted host selects its unique directly owned viewport unless an explicit source is supplied.

Output starts with format SVG, page scope, scale 1, unset background, Follow app color scheme and A4 portrait. format supports SVG/PNG/JPEG/Print and scope supports page/selection/all; all pages is for SVG/print, not one raster download. State is readonly through useDiagramOutput(); use setFormat, setScope, setScale, setBackground, setColorScheme, setPaper and setOrientation. colorScheme initializes from and follows later baseOptions.colorScheme updates/removal. Follow app removes the effective key, including an earlier base value. Canvas default preserves an explicit base background or uses the themed canvas; a user background overrides it. Color-scheme changes invalidate prepared output. Creation/preparation is separate from SVG download and the browser print action. Preserve diagnostics and cancellation. Browser printing supplies no direct PDF-file engine.

#Try the label controls

DiagramLabelListUI selects an existing saved label. DiagramLabelPropertiesUI edits its text, alignment, rotation, and node-local or connector-path placement. They share the selection inspector and do not create new labels.

Select the second label on a shape, edit its text, and commit it. The node title remains separate. Selecting a connector label exposes path placement. Undo reverses an accepted change.

Loading Demo...

The selection accessor exposes readonly labelOwner, labelOptions, selectedLabel, chosenLabelId and labelBusy, with selectLabel(id) and canSelectedLabel(). Custom fields call setSelectedLabelProperty(ownerId, labelId, property, value): it returns the canonical string/number, or null for a stale target. Pending, rejected or unavailable edits return the prior canonical value. Reconcile the field from that result; do not assign to saved records or readonly refs. Use public content actions for additional label creation/removal. See Inspector composition and Output composition.

#Try the output controls

Select a node, choose selection output, and create SVG. Print has separate preparation and browser print actions. Vue export captures eligible mounted content and rejects required offscreen framework content.

Loading Demo...

#Runtime slots and contexts

Public accessors expose readonly snapshots and bound actions. In setup, read refs with .value; templates unwrap top-level refs. Use the documented flat setter actions to change presentation choices. Do not assign to readonly snapshot refs or reach into private component state.

The runtime still owns graph geometry, policy checks, focus, gestures, and transaction reconciliation. Slots and contexts describes the host-prop getters and context scopes for custom content. API lists the public root and viewport contracts.

Root showDefaultDiagnostics changes default diagnostics presentation independently of licensing. A custom diagnostics slot retains one root-owned alert. Menu and tooltip defaultPresentation changes chrome while the runtime retains placement, dismissal, focus and ARIA ownership.