
Catppuccin for Marpit
To use this theme, you just need to reference one of the generated CSS files and declare the theme in your Markdown frontmatter.
- Create a markdown file for your presentation (e.g.,
slide.md). - Add the appropriate Catppuccin flavor to your Marpit frontmatter:
---
theme: catppuccin-mocha
---
# Catppuccin Marp
Welcome to my soothing presentation!
---
<!-- _class: lead -->
## Centered Slide
This theme also ports the built-in Marp "lead" class for centered content!You can load the custom themes into the Marp CLI using command-line flags or a configuration file.
Make a single theme available:
# Point directly to a specific CSS file.
marp --theme-set themes/catppuccin-mocha.css -- slide.mdMake all flavors available:
# Point to the entire directory to load all 4 flavors, allowing you to easily switch between them in your Markdown frontmatter.
marp --theme-set themes -- slide.mdNote
Passing a theme via --theme-set does not automatically apply it.
It simply makes the theme available for Marp to consume if you've declared it in your Markdown's frontmatter (e.g., theme: catppuccin-mocha).
Force a theme (override frontmatter):
If you want to completely ignore the theme: declaration in your Markdown file and force a specific flavor, use the --theme flag instead.
marp --theme themes/catppuccin-mocha.css -- slide.mdIf you prefer not to type flags every time, you can define your active themes in a Marp configuration file.
Here is an example .marprc (using YAML format) that registers the entire themes directory and sets Mocha as the default theme:
# .marprc
themeSet:
- themes
# Optional: force this theme on all slides, overriding frontmatter
theme: catppuccin-mochaThen, you can simply run Marp CLI pointing to your config:
marp --config-file marp.config.yml slide.mdIf you use the Marp for VS Code Extension, you can configure it to globally recognize the Catppuccin themes.
- Download the
themes/folder to your workspace. - Open your VS Code
settings.json(Workspace or Global). - Add the paths to the Catppuccin CSS files under
markdown.marp.themes:
{
"markdown.marp.themes": [
"./themes/catppuccin-latte.css",
"./themes/catppuccin-frappe.css",
"./themes/catppuccin-macchiato.css",
"./themes/catppuccin-mocha.css"
]
}Now, typing theme: catppuccin-mocha in your markdown file will instantly apply the theme in the VS Code preview panel!
Each flavor exports its palette through CSS variables, with the addition of opacity-based variables for each color, from 10 to 90%:
--red: #f38ba8;
--red-10: rgba(243, 139, 168, 0.10);
/* ... */
--red-90: rgba(243, 139, 168, 0.90);Similarly to Marp's builtin Gaia theme, this theme provides the lead CSS class, which centers the contents of the slide when applied. It is useful for the leading page like a title slide.
<!--
theme: catppuccin-mocha
class: lead
-->Tip
Marpit's scoped local directive would be useful to apply lead class only into a current page.
<!-- _class: lead -->This project uses Whiskers to dynamically generate the 4 Catppuccin flavors. To build locally:
- Clone the repository:
git clone https://github.com/nicolas-goudry/marp.git - Install Whiskers
- Build the themes:
whiskers marp.tera - The generated
.cssfiles will be placed in thethemes/directory.
- Marp Team for the amazing presentation framework.
- Nicolas Goudry
Β
Copyright Β© 2021-present Catppuccin Org




