prettier-plugin-mmd weekly downloads statistics
By mmd-toolkit · npm · Prettier plugins
Prettier plugin for the Mermaid diagram syntax (.mmd files and mermaid code blocks in Markdown)
prettier-plugin-mmd has 362 recorded weekly downloads on npm, a decrease of 51.2% over the past 30 days, ranking #2334 of 3,247 tracked listings.
About prettier-plugin-mmd
prettier-plugin-mmd
Japanese version: README.ja.md
A Prettier plugin that formats
Mermaid diagrams: .mmd and .mermaid files, and
mermaid code blocks in Markdown.
This is a third-party project, not affiliated with
mermaid-js. mmd here means the Mermaid diagram
syntax, not MultiMarkdown or MikuMikuDance.
Documentation: Formatter.
Playground
Preview this plugin's formatting in the browser. The Formatted tab updates as you edit, with Print width, Indent, and Use tabs controls. Use Apply to source to replace the input with the result.
Open the Playground.
For usage, see the Playground guide.
Installation
Install it next to Prettier 3. It needs Node.js ^20.19.0 || ^22.13.0 || >=24.
npm install --save-dev prettier prettier-plugin-mmd
Then add it to your Prettier configuration. Prettier 3 does not find plugins by itself, so this entry is required:
{
"plugins": ["prettier-plugin-mmd"]
}
Prettier then formats Mermaid files and Markdown files as usual, for example:
npx prettier --write "**/*.{mmd,mermaid,md}"
Example
Input (file):
flowchart LR
A --> B; B --> C; C --> D
subgraph S; E; F; end
Output (file):
flowchart LR
A --> B
B --> C
C --> D
subgraph S
E
F
end
What is formatted
- Files ending in
.mmdor.mermaid. - Markdown code blocks whose info string has
mermaidormmdas its first word. The match is case-sensitive:Mermaidandmermaidxare not formatted. - Every diagram type of mermaid.js.
- The YAML frontmatter of these diagrams, with Prettier's YAML formatter.
The formatting rules of each diagram type are in its document: flowcharts, Agentflow, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, user journeys, requirement diagrams, mindmaps, timelines, sankey diagrams, XY charts, quadrant charts, kanban boards, C4 diagrams, Venn diagrams, Ishikawa diagrams, usecase diagrams, pie charts, info diagrams, git graphs, architecture diagrams, treemaps, treeviews, radar diagrams, Wardley maps, railroad diagrams, cynefin diagrams, eventmodeling diagrams, packet diagrams, and block diagrams.
Options
useTabsandtabWidthset the indentation. The default is two spaces.endOfLinesets the line endings.printWidthdecides two things. A data block@{ … }on one line in a flowchart, an agentflow, or a kanban board is printed on several lines when its line is wider thanprintWidthand the conditions of Data blocks hold; a block of one entry, for example, stays on its line. The colons of the tasks of a Gantt section are lined up unless that would make a line wider thanprintWidthand wider than it is (see Task data). The width is the one Prettier measures: a full-width character counts as two columns and a tab as none. A Gantt section counts its lines alone, without what a Markdown list or block quote puts before them. Everywhere elseprintWidthdoes not control diagram line breaks.railroad-betacalls follow their grammar structure; see Long lines. Prettier can still use it for Markdown and YAML frontmatter.
When a diagram is not formatted
- Text that mermaid.js rejects is not changed. In a file, Prettier reports a syntax error and leaves the file as it is. In Markdown, the code block is left to Prettier, which prints it as code it does not format.
- A few inputs that mermaid.js accepts are reported as syntax errors too. For
example, a directive inside a keyword, as in
sub%%{init: {}}%%graph S, and aclickthat does not start a click statement, as insubgraph Handle click events: in flowchart,clickis a reserved word. An empty string between tokens, as inA-->|x""|B, is reported too. The full list is in docs/compatibility.md. - A text of only the word
error, with comments, directives, and line breaks around it, is not changed, except that line endings followendOfLine: mermaid.js reads it as itserrorpseudo-diagram. In Markdown, it is left to Prettier.
Guarantees and limitations…
Description from the npm listing.
- prettier
- prettier-plugin
- mermaid
- mmd
- formatter
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm Prettier plugins plugins
All 20 prettier-plugin-mmd alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/prettier-plugin-mmd. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.