Search
DiagramItem.cssClass Property
See Also
 





Gets or sets the CSS class associated with this item.

Namespace: MindFusion.Diagramming
File: DiagramItem.js

 Syntax

JavaScript  Copy Code

get cssClass() {}
set cssClass(value) {}

 Property Value

String

A string containing the CSS class.

 Remarks

You could set this value to associate CSS rules with a specific item using class selector.

 Example

JavaScript  Copy Code
// JavaScript
node.text = "Attention";
node.cssClass = "urgent";

// CSS
mfd-shapenode.urgent {
    --brush: #ffcccc;
    --stroke: red;
}

 See Also