An interactive node-and-edge architecture canvas on a dot grid. Drag any node with the pointer or nudge it with the arrow keys — smooth Bézier connectors and edge labels recompute live. Walkthrough: Ply Pro preview: an Angular Gantt chart and a node diagram.
Unlock it plus 108 pro blocks, widgets & layouts — $99 one-time. Lifetime updates, 14-day money-back guarantee.
Ply install pipeline
<ply-diagram [nodes]="nodes()" [edges]="edges" label="Ply install pipeline" (nodesChange)="nodes.set($event)"></ply-diagram>
TypeScript
import { Component, signal } from '@angular/core';
// Install: npx ply-ui-cli add diagram
// Paths are relative to aliases.components (default: src/app/components)
import { DiagramComponent, DiagramEdge, DiagramNode } from './diagram/diagram.component';
@Component({
selector: 'app-diagram-example',
imports: [
DiagramComponent
],
template: `...`
})
export class DiagramExampleComponent {
nodes = signal<DiagramNode[]>([
{ id: 'cli', label: 'ply-ui-cli', caption: 'add gantt', icon: 'terminal', x: 24, y: 120 },
{ id: 'registry', label: 'Registry', caption: 'MIT + Pro source', icon: 'database', x: 236, y: 40 },
{ id: 'mcp', label: 'MCP Server', caption: 'Cursor & Claude', icon: 'sparkles', x: 236, y: 204 },
{ id: 'repo', label: 'Your Repo', caption: 'src/app/ui/', icon: 'file-code', accent: true, x: 452, y: 120 },
]);
edges: DiagramEdge[] = [
{ from: 'cli', to: 'registry', label: 'fetch' },
{ from: 'cli', to: 'mcp', label: 'sync' },
{ from: 'registry', to: 'repo', label: 'copy' },
{ from: 'mcp', to: 'repo', label: 'wire' },
];
}Install
npx ply-ui-cli add diagram
npx ply-ui-cli add diagram
For AI agents
Copy a prompt with the registry name, CLI install, and import — or add the Ply MCP server.
npx -y ply-ui-mcp
Ply provides standalone components. Import the exact elements you want to use into your component.
// Install: npx ply-ui-cli add diagram
// Paths are relative to aliases.components (default: src/app/components)
import { DiagramComponent, DiagramEdge, DiagramNode } from './diagram/diagram.component';
@Component({
selector: 'app-your-component',
imports: [
DiagramComponent
],
template: `...`
})
export class YourComponent {} API for diagram — generated from JSDoc in the library source.
| API | Member | Type | Default | Description |
|---|---|---|---|---|
DiagramEdge | from | string | — | — |
DiagramEdge | to | string | — | — |
DiagramEdge | label | string | — | Optional pill label drawn on the midpoint of the curve. |
DiagramNode | id | string | — | — |
DiagramNode | label | string | — | — |
DiagramNode | caption | string | — | — |
DiagramNode | icon | string | — | Optional `ply-icon` name rendered inside the node badge. |
DiagramNode | accent | boolean | — | Highlights the node with the primary accent border. |
DiagramNode | x | number | — | — |
DiagramNode | y | number | — | — |
ply-diagram | class | string | '' | Extra host classes merged via `cn()`. |
ply-diagram | nodes | DiagramNode[] | [] | Nodes. Two-way bindable so dragging or arrow-key nudging updates the caller. |
ply-diagram | edges | DiagramEdge[] | [] | Connectors between node ids. |
ply-diagram | label | unknown | 'Diagram' | Accessible name for the canvas. |
Content