Skip to content

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.

Add typed to any code block’s meta string to enable the typing animation:

```bash typed
$ npm install my-package
Done!
```

Lines starting with the prompt character ($ by default) will type character-by-character. All other lines (output) appear instantly.

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!"
```

Change the prompt character for this block:

```python typed prompt=">>>"
>>> print("Hello!")
Hello!
```

Control when the animation starts:

```bash typed trigger="click"
$ npm start
```

Options: visible (default), click, load

Override the start delay and line delay:

```bash typed delay="1000" lineDelay="500"
$ echo "Custom timing"
```

Add a pause before output appears to simulate command execution:

```bash typed outputDelay="500"
$ npm install
Installing dependencies...
Done!
```

Enable continuous replay:

```bash typed loop loopDelay="2000"
$ echo "This will repeat"
Hello!
```

Add natural randomness to typing speed (0-1 range):

```bash typed variance="0.3"
$ echo "More realistic typing"
```

Pause after each line for user-controlled progression. A “Click to continue” hint appears when paused:

```bash typed stepMode
$ Step 1: Install dependencies
Installing...
$ Step 2: Build the project
Building...
```

Advancing to the next step:

MethodAction
MouseClick anywhere on the code block
KeyboardPress Space, Enter, (Arrow Right), or (Arrow Down)

Show a skip button during the animation, allowing users to immediately complete it:

```bash typed skip
$ npm install
Installing packages...
$ npm run build
Building project...
Done!
```

The skip button appears at the bottom-right corner while the animation is running.

You can combine multiple options:

```bash typed variance="0.3" outputDelay="300" loop
$ npm run build
Compiling...
Done!
```
OptionTypeExampleDescription
typedflagtypedEnable typing animation
speednumberspeed="25"Ms per character
promptstringprompt=">>>"Prompt character(s)
triggerstringtrigger="click"When to start
delaynumberdelay="1000"Initial delay
lineDelaynumberlineDelay="500"Delay between lines
outputDelaynumberoutputDelay="300"Delay before output
loopflagloopEnable looping
loopDelaynumberloopDelay="2000"Delay before loop restart
variancenumbervariance="0.3"Typing speed variance
stepModeflagstepModePause after each line
skipflagskipShow skip button

See live demos on the Examples page, or set global defaults on the Configuration page.