Marpit

Marpit /mɑːrpɪt/ — a skinny framework for generating slide decks from Markdown. Returns minimal HTML/CSS ready to be printed as PDF. Independent from Marp, but it is Marp’s foundation.

Description

Download or use

npm install @marp-team/marpit

🗒️ Description

🧩 Three pillars

  • Marpit Markdownmarkdown-it extensions: directives, slide backgrounds, image syntax. Compatibility with plain Markdown is preserved.
  • Theme CSS — pure CSS, without predefined classes or mixins. You style HTML elements; the framework handles the rest.
  • Inline SVG slide (experimental) — each slide inside <svg>, pixel-perfect scaling with CSS alone, <foreignObject> for advanced backgrounds.

🧩 Pluggability

Marpit has a pluggable architecture — you can extend it through markdown-it plugins. That’s why Marp Core is just an overlay: it adds themes, math, emoji, auto-scaling, but the conversion engine is Marpit.

Marpit does not ship any themes. If you need official themes + features, use Marp Core.

🧩 Sub-project

✍️ Reasoning for

I don’t use Marpit directly very often — in 99% of cases Marp Core via Marp CLI is enough. Marpit comes up if I want totally custom themes without the baggage of Marp Core (marp --engine @marp-team/marpit) or if I want to build my own slide conversion engine.

🔗 Resources


Template: tool