What is @mirrordown/markdown?
@mirrordown/markdown is a collection of markdown syntax extensions for the unified, markdown-it and Sätteri ecosystems. Each plugin is independently installable and adds a specific syntax enhancement to your markdown authoring experience — from inline formatting like <del> and <ins>, to rich block-level components like tabbed code groups and step-by-step guides.
The plugins are designed to work with Astro, VitePress, and any toolchain built on remark + rehype, markdown-it or Sätteri.
Why these plugins?
Standard CommonMark and GitHub Flavored Markdown cover the basics, but technical documentation often needs more:
- Inline semantics — strikethrough (
del), insertion (ins), keyboard keys (kbd), highlighted text (mark), ruby annotations, abbreviations - Rich blocks — tabbed content for multi-language examples, numbered step sequences, GitHub-style callout alerts, Mermaid diagrams rendered to SVG at build time, captions for any block
- Structural helpers — definition lists, attribute passthrough, image unwrapping for proper figure markup
Rather than pulling in a monolithic documentation framework, these plugins compose cleanly with your existing markdown pipeline.
Installation
Each plugin is published separately under the @mirrordown scope. Install only what you need:
# Core inline plugins
yarn add @mirrordown/remd-del @mirrordown/remd-ins @mirrordown/remd-kbd @mirrordown/remd-mark
# Block-level components
yarn add @mirrordown/remd-tabs @mirrordown/remd-steps @mirrordown/remd-github-alerts
yarn add @mirrordown/remd-mermaid-pele
# Structural helpers
yarn add @mirrordown/remd-abbr @mirrordown/remd-attrs @mirrordown/remd-definition-list
yarn add @mirrordown/remd-ruby @mirrordown/remd-sub @mirrordown/remd-sup
yarn add @mirrordown/remd-unwrap-images
To use the whole suite, install a preset instead: @mirrordown/preset-remark, @mirrordown/preset-markdown-it or @mirrordown/preset-satteri turns every feature on, and any of them off with false:
// astro.config.ts
import { defineConfig } from "astro/config";
import { unified } from "@astrojs/markdown-remark";
import { mirrordown } from "@mirrordown/preset-remark";
export default defineConfig({
markdown: {
// Astro highlights code before the plugins run; mermaid diagrams and file trees render instead.
syntaxHighlight: { type: "shiki", excludeLangs: ["mermaid", "filetree"] },
processor: unified(mirrordown({ lightbox: false })),
},
});
With Sätteri, the preset is the options markdownToHtml takes, and Astro's satteri() processor takes them too:
import { markdownToHtml } from "satteri";
import { mirrordown } from "@mirrordown/preset-satteri";
const { html } = markdownToHtml(source, mirrordown({ lightbox: false }));
Basic Setup (Astro)
Add the plugins to your astro.config.ts:
import { defineConfig } from "astro/config";
import { remarkDel } from "@mirrordown/remd-del";
import { remarkKbd } from "@mirrordown/remd-kbd";
import { remarkTabs, tabsHastHandlers } from "@mirrordown/remd-tabs";
import { remarkSteps, stepsHastHandlers } from "@mirrordown/remd-steps";
export default defineConfig({
markdown: {
remarkPlugins: [remarkKbd, remarkDel, remarkSteps, remarkTabs],
remarkRehype: {
handlers: {
...tabsHastHandlers,
...stepsHastHandlers,
},
},
},
});
The order of the list matters for some plugins: here kbd comes before del, so a key's brackets keep the -- inside them, and tabs after the inline plugins. Each plugin's guide says where it goes, and the presets order the whole suite for you.
Plugins that produce block-level HTML elements (tabs, steps, alerts) also need their stylesheet imported in your layout:
import "@mirrordown/remd-tabs/tabs.css";
import "@mirrordown/remd-steps/steps.css";
import "@mirrordown/remd-github-alerts/github-alerts.css";
Next Steps
Browse the Plugins section in the sidebar to see syntax examples and configuration options for each extension.