Skip to content
Lower pricing Individual licenses are now $49/year for Studio, $25 for Core — See pricing →

Element Style Pane

Last updated:

The Style Pane is one part of Mermaid Studio’s visual editing workflow. It is a property inspector in the Mermaid Studio tool window that lets you view and edit CSS styling for diagram elements without writing style or classDef lines by hand.

The preset strip in this recording predates Mermaid Studio 2026.4.0; see Style presets for the current layout.

The controls the Style Pane shows depend on the active diagram type. The list below is generated from the plugin’s feature report; see each diagram-type page for the controls available there.

Support for additional diagram types will be added in future releases.

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

Place your caret on a styleable element in the editor, or click the element directly in the live preview. The Style Pane tracks your selection and displays the properties for the element under the caret.

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

Once an element is selected, the selection stays pinned through editor focus changes, caret movements off the element, and unrelated text edits. The pane no longer rebuilds or loses its active mode selector on every keystroke, and it refreshes after edits from the formatter, an inspection quick fix, or other non-typing edit paths.

Renaming a selected element follows through to the pane header and the preview highlight automatically; the selection clears only when the element is actually deleted.

The same pinning, rename following, and edit-driven refresh apply to Mermaid diagrams embedded in Markdown code fences.

Properties are organized into collapsible groups. 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. Text and numeric fields commit on Enter Enter ; Escape Escape reverts an edited field to its loaded value, and tabbing past an unchanged field leaves it untouched.

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 accepts arbitrary CSS properties beyond the built-in groups.

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

The Style Pane shows where each property value comes from.

  • Inline styles — From style A fill:#f9f statements. These have the highest precedence. When a property has a value to remove, the row shows an X button whose tooltip names the specific property (for example Remove Fill); the button hides itself when there’s nothing to remove.
  • 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.

Above the property groups, the pane shows a strip of style presets for the selected element type. Presets are available for flowchart and swimlane nodes, subgraphs, and links, and for class diagram classes.

Every preset derives from the theme the diagram renders with, either the built-in Mermaid.js theme in effect or an applied custom theme. The strip shows the first two tone rows cut to the pane’s width, and the All Presets popup shows every row. Each column is a hue family named after the visible fill hue (Red, Gold, Teal, Blue, and so on) and each row a tone tier (Light, Mid, Dark), so a chip reads as Blue · Mid. Each tier is derived lighter or darker than the theme’s own tone, so every label is readable against its fill. One chip reproduces the theme’s own defaults and is labeled Slate (default) or the equivalent for the theme in effect. A Neutral family completes the set, plus a maximum-contrast Black or White edge chip for links. Themes whose nodes are a neutral surface with a colored border (the Redux family and the bundled dark variants) show an outlined identity row plus a Filled companion tier, named Teal · Filled.

When the diagram’s theme changes, whether by editing the frontmatter, applying a theme, or switching the appearance defaults, the strip regenerates from the new theme. The capture below shows the strip and the All Presets popup on a flowchart with the bundled Slate theme applied.

Style tab showing the two derived tone rows and the All Presets popup open on a Slate-themed flowchart

The trigger at the left edge of the strip opens the All Presets popup with every derived preset and, under Custom, the presets you have saved. Start typing to filter; Escape Escape clears the filter first and closes the popup second. The popup stays open while you apply, so you can try several presets on the selected element before closing it. The + cell in the Custom section saves the selected element’s current style as a custom preset.

The plugin generates derived presets on the fly; the presets you save yourself persist. Applying a derived preset writes the same classDef or inline style the pane would write by hand, so the result is plain Mermaid.

Clicking a color swatch opens Mermaid Studio’s HCT color picker in place of the IDE’s default chooser. HCT stands for hue, chroma, and tone. Moving the tone slider changes lightness without changing the hue you see, which is what tuning a palette usually calls for.

  • Hex field and resolved swatch; Enter Enter commits and closes the popup
  • Hue, Chroma, and Tone sliders with editable numeric fields; Enter Enter in a numeric field applies without closing, and Up Arrow Up Arrow / Down Arrow Down Arrow nudge by one
  • Alpha slider for properties that accept transparency
  • Pick Color from Screen, a pipette that samples any pixel on screen; the picked hex shows in a readout next to the cursor and applies on click
  • Suggestion groups: Recently used (the last twelve picks on this machine), In this diagram (colors already assigned to the same property elsewhere in the diagram), and Theme palette (the derived preset values for the property)

If you would rather pick hue and chroma together, the Color Wheel button in the picker’s header swaps the Hue and Chroma sliders for a wheel drawn at the current tone, with the Tone slider below it. On the wheel, the arrow keys move hue and chroma, Option + Up Arrow Alt + Up Arrow and Option + Down Arrow Alt + Down Arrow move tone, and Shift Shift steps by ten. The mode applies to every picker you open for the rest of the IDE session, and Sliders switches back.

HCT color picker in Color Wheel mode over the New Theme from Seeds dialog: a hue and chroma disc with the current color marked, the Tone slider below it, and the Sliders toggle in the header

Without it, the picker shows a notice pointing to System Settings > Privacy & Security. The pipette button is hidden on Wayland sessions without XWayland.

The preset strip is two focus stops: the All Presets trigger and the chip grid. Arrow keys move between chips, Left Arrow Left Arrow from the first column lands on the trigger, and Enter Enter or Space Space applies the focused chip. Inside the All Presets popup, Tab Tab switches between the filter and the grid.

Section headers, the reset and unlink glyphs, and the source badges are focusable controls that respond to Enter Enter and Space Space . The shape and icon pickers open with focus on their grids; see Keyboard Shortcuts for their keys.

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