Per-Block Options
Override global settings for individual code blocks using meta string options. These options are added directly to the code block’s opening fence.
Basic Usage
Section titled “Basic Usage”Add typed to any code block’s meta string to enable the typing animation:
```bash typed$ npm install my-packageDone!```Lines starting with the prompt character ($ by default) will type character-by-character. All other lines (output) appear instantly.
Per-Block Overrides
Section titled “Per-Block Overrides”Override any global setting for a specific code block by adding options to the meta string.
Override the typing speed (milliseconds per character):
```bash typed speed="25"$ echo "Fast typing!"```prompt
Section titled “prompt”Change the prompt character for this block:
```python typed prompt=">>>">>> print("Hello!")Hello!```trigger
Section titled “trigger”Control when the animation starts:
```bash typed trigger="click"$ npm start```Options: visible (default), click, load
delay / lineDelay
Section titled “delay / lineDelay”Override the start delay and line delay:
```bash typed delay="1000" lineDelay="500"$ echo "Custom timing"```outputDelay
Section titled “outputDelay”Add a pause before output appears to simulate command execution:
```bash typed outputDelay="500"$ npm installInstalling dependencies...Done!```loop / loopDelay
Section titled “loop / loopDelay”Enable continuous replay:
```bash typed loop loopDelay="2000"$ echo "This will repeat"Hello!```variance
Section titled “variance”Add natural randomness to typing speed (0-1 range):
```bash typed variance="0.3"$ echo "More realistic typing"```stepMode
Section titled “stepMode”Pause after each line for user-controlled progression. A “Click to continue” hint appears when paused:
```bash typed stepMode$ Step 1: Install dependenciesInstalling...$ Step 2: Build the projectBuilding...```Advancing to the next step:
| Method | Action |
|---|---|
| Mouse | Click anywhere on the code block |
| Keyboard | Press Space, Enter, → (Arrow Right), or ↓ (Arrow Down) |
Show a skip button during the animation, allowing users to immediately complete it:
```bash typed skip$ npm installInstalling packages...$ npm run buildBuilding project...Done!```The skip button appears at the bottom-right corner while the animation is running.
Combining Options
Section titled “Combining Options”You can combine multiple options:
```bash typed variance="0.3" outputDelay="300" loop$ npm run buildCompiling...Done!```Quick Reference
Section titled “Quick Reference”| Option | Type | Example | Description |
|---|---|---|---|
typed | flag | typed | Enable typing animation |
speed | number | speed="25" | Ms per character |
prompt | string | prompt=">>>" | Prompt character(s) |
trigger | string | trigger="click" | When to start |
delay | number | delay="1000" | Initial delay |
lineDelay | number | lineDelay="500" | Delay between lines |
outputDelay | number | outputDelay="300" | Delay before output |
loop | flag | loop | Enable looping |
loopDelay | number | loopDelay="2000" | Delay before loop restart |
variance | number | variance="0.3" | Typing speed variance |
stepMode | flag | stepMode | Pause after each line |
skip | flag | skip | Show skip button |
See live demos on the Examples page, or set global defaults on the Configuration page.