Block Syntax
Block syntax
Dev-reel blocks use frontmatter syntax (YAML) for configuration, followed by terminal content. This page documents all available options.
Basic structure
```dev-reel[YAML frontmatter here]
[terminal content here]```Frontmatter options
title (required)
Name of the SVG file to be generated. No need to include the .svg extension.
title: my-terminal-demo# Generates: assets/my-terminal-demo.svgtheme
Color theme. Default: promise-inc
theme: promise-inc # Default theme (dark with cyan)theme: dracula # Purple/pink themetheme: nord # Blue/frost themetheme: catppuccin-mocha # Warm dark themeanimation
Array of animations to apply. Can combine multiple. Default: []
animation: - typing # Typing effect - fade-lines # Lines appear gradually - blink-cursor # Blinking cursor - scanline # CRT scanline effect - wave # Wave movement - pulse-error # Pulse on errors - glow-success # Glow on successes - noise-overlay # Noise texture - progress-bar # Animated progress bar - grow-bars # Bars grow - slide-cards # Cards slide (bento)frame
Frame/border type around the content. Default: terminal
frame: terminal # macOS window with traffic lightsframe: card # Simple rounded cardframe: browser # Browser chrome with URL barframe: mobile # Mobile phone frameframe: none # No framewidth
SVG width in pixels or 'auto'. Default: auto
width: auto # Adjust to contentwidth: 600 # Fixed 600pxwidth: 1200 # Fixed 1200pxcursor
Show blinking cursor. Default: true
cursor: true # Visible cursorcursor: false # No cursorprefix
Custom command prefix. Default: $
prefix: "$" # Bash/sh styleprefix: ">" # PowerShell styleprefix: "❯" # Modern shellprefix: "user@host $" # Full promptshowTitle
Show title in frame header (terminal/browser). Default: true
showTitle: true # Visible titleshowTitle: false # No titlerawMode
Disables line type parsing. Everything is rendered as normal text. Default: false
rawMode: false # Automatic parsing of $, ✔, etcrawMode: true # Everything as normal textlayout
Layout for multiple blocks. Default: single (one SVG per block)
layout: single # Individual SVGlayout: bento # Bento grid (multiple blocks in one SVG)font
Font settings. Object with family, size, lineHeight.
font: family: "Fira Code, monospace" size: 14 lineHeight: 1.5Default values:
font: family: "SF Mono, Monaco, Consolas, monospace" size: 14 lineHeight: 1.6Line types
Dev Reel automatically detects line type based on special characters:
| Type | Characters | Color | Example |
|---|---|---|---|
| Command | $ or > | Accent | $ npm install |
| Success | ✔ ✓ | Green | ✔ Build completed |
| Error | ✖ ✗ | Red | ✖ Failed to compile |
| Warning | ⚠ | Yellow | ⚠ Deprecated API |
| Info | ℹ | Blue | ℹ Using cache |
| Progress | [=== ] | Accent | [====> ] 50% |
| Output | - | Foreground | Output text |
| Empty | - | (spacing) |
Complete example
Block using all main options:
```dev-reeltitle: full-exampletheme: draculaanimation: - typing - fade-lines - blink-cursor - glow-successframe: terminalwidth: 800cursor: trueprefix: "❯"showTitle: truerawMode: falsefont: family: "JetBrains Mono, monospace" size: 15 lineHeight: 1.7
❯ npm create vite@latest my-app✔ Select framework: React✔ Select variant: TypeScript
❯ cd my-app❯ npm install[=========> ] Installing... 85%
✔ Dependencies installed in 3.2sℹ Run 'npm run dev' to start
❯ npm run dev> Starting dev server...✔ Server ready at http://localhost:5173```TypeScript interface
For reference, the complete TypeScript interface:
interface DevReelBlock { title: string; theme?: "promise-inc" | "dracula" | "nord" | "catppuccin-mocha"; animation?: Array< | "typing" | "blink-cursor" | "fade-lines" | "scanline" | "wave" | "pulse-error" | "glow-success" | "noise-overlay" | "progress-bar" | "grow-bars" | "slide-cards" >; frame?: "terminal" | "card" | "browser" | "mobile" | "none"; width?: number | "auto"; cursor?: boolean; prefix?: string; showTitle?: boolean; rawMode?: boolean; layout?: "single" | "bento"; font?: { family?: string; size?: number; lineHeight?: number; }; content: string; // Content after frontmatter}Tips and best practices
- Use descriptive titles: 'install-demo' instead of 'demo1'
- Combine 2-3 animations for best effect: typing + fade-lines + blink-cursor
- Progress bars work well with the 'progress-bar' animation
- Use rawMode for code or output that shouldn't be colorized
- Bento layout is great for side-by-side comparisons
- Dark themes (dracula, nord) work better in GitHub dark mode
- Limit width to 800-1000px for best viewing on GitHub