Skip to content
New Mermaid Studio Core — free Mermaid diagram support in JetBrains IDEs — Install now →

Style Pane

Last updated:

The Style Pane is a property inspector in the Mermaid Studio tool window that lets you view and edit CSS styling properties for diagram elements without writing style commands by hand.

The Style Pane appears as a Style tab in the Mermaid Studio tool window (typically on the right side of the IDE). Click the tab to switch to it.

Place your cursor on a styleable element in the editor. The Style Pane automatically tracks your cursor position and displays the properties for the element under the caret.

Styleable elements in flowcharts include:

  • Nodes - Individual diagram nodes
  • Subgraphs - Subgraph containers
  • Links - Edges between nodes (with linkStyle support)
  • classDef definitions - CSS class definitions

When a styleable element is selected, the header shows the element’s icon, name, and label (if any).

The preset gallery lets you apply reusable styles.

Select a node or element, then choose a preset from the gallery to apply its styles. Built-in presets are included for common styling patterns.

When a flowchart node is selected, the Style Pane shows a shape editor with:

  • Shape selector - Choose from available node shapes with SVG icons showing each shape visually
  • Arrow controls - Configure the direction of connections into and out of the node

Shape changes are written back to the diagram source as the appropriate Mermaid syntax.

When a link (edge) is selected, the Style Pane shows link-specific styling controls.

Changes are written as linkStyle declarations in the diagram source. If a linkStyle declaration already exists for the selected link, the Style Pane updates it in place. Otherwise, a new declaration is added.

You can navigate between links and their linkStyle declarations using Go to Related ( Control + Command + Up Arrow Control + Alt + Up Arrow ).

Properties are organized into collapsible groups:

PropertyDescription
fillBackground color
strokeBorder color
stroke-widthBorder thickness
stroke-dasharrayBorder dash pattern (solid, dashed, dotted)
fill-opacityBackground transparency (0 to 1)
stroke-opacityBorder transparency (0 to 1)
PropertyDescription
colorText color
font-sizeText size
font-weightText weight (normal, bold, or numeric 100-900)
font-familyFont face (generic or specific)
font-styleNormal, italic, or oblique
PropertyDescription
rxCorner radius (horizontal)
ryCorner radius (vertical)

The Other section is collapsible and allows editing arbitrary CSS properties beyond the built-in groups. You can add any valid CSS property here for advanced styling needs.

PropertyDescription
opacityOverall element transparency (0 to 1)
cursorCSS cursor style
visibilityVisible, hidden, or collapse

Color properties display a swatch next to the value. Click the swatch to open the color picker.

Dropdown properties like font-size and stroke-dasharray offer predefined values but also accept custom input.

The Style Pane shows where each property value comes from:

  • Inline styles - From style A fill:#f9f statements. These have the highest precedence and show an X button to remove the property.
  • Class definitions - From a classDef applied via class A myClass or A:::myClass. These show a source badge with the class name. Click the badge to navigate to the class definition, or click the unlink button to remove the class association.
  • linkStyle declarations - From linkStyle 0 stroke:#f00 statements targeting the selected link by index.

When the same property is set in both a class and an inline style, the inline style takes precedence.

When a flowchart node is selected, the Style Pane shows a Link tab for editing click handler properties. This tab is only visible for nodes.

PropertyDescription
URLThe destination URL for the click handler
TooltipHover text shown over the node
TargetLink target (_self, _blank, _parent, or _top)

The Tooltip and Target fields are disabled until a URL is set.

Setting a URL creates a click statement in the diagram source (e.g., click A href "https://example.com" "My tooltip" _blank). If the node already has a click handler (including JavaScript callbacks), it is replaced. Clearing the URL removes the click statement entirely.

All style changes integrate with the IDE’s undo system. Press Command + Z Control + Z to revert a change.