- Docs
- Components
- Interface
- Product Mockups
- Terminal Replay
A terminal window that plays back a scripted CLI session
| Name | Type | Default | Description |
|---|---|---|---|
script | TerminalStep[] | project setup | The session to play. Steps are { type: "command", text, directory? }, { type: "output", lines, delay? }, { type: "spinner", text, duration?, done?, status? }, { type: "progress", text, duration?, done? }, { type: "pause", duration? } and { type: "clear" }. Text can colour parts with [success]…[/], [error]…[/], [warning]…[/], [info]…[/], [accent]…[/], [muted]…[/], [dim]…[/] and [bold]…[/]. |
title | string | "my-app — zsh" | Text in the title bar. An empty string hides it. |
prompt | string | "❯" | The prompt symbol before each command. |
directory | string | "~" | Directory shown before the prompt. A command can set its own with directory. |
chrome | "window" | "minimal" | "none" | "window" | Window adds the three dots and a title, minimal keeps only the title, none removes the title bar. |
frame | "solid" | "inset" | "inset" | Solid draws one surface. Inset puts the title bar on a tinted frame and sets the session in its own rounded panel, with corners concentric to the frame. |
dots | "mono" | "color" | "mono" | Quiet grey window dots, or the classic red, yellow and green. |
theme | "auto" | "light" | "dark" | "auto" | Auto picks a light or dark window from the colour behind it, so it follows your site theme. |
accentColor | string | theme violet | Colour of the prompt, spinners, progress bars and [accent] text. |
windowColor | string | from theme | Background of the window. |
textColor | string | from theme | Main text colour. |
fontFamily | string | system monospace | Font of the session. Uses your --font-mono variable when it exists. |
fontSize | number | 13 | Font size in pixels. |
lineHeight | number | 1.7 | Line height as a multiple of the font size. |
height | number | string | 360 | Height of the window. Older lines scroll up and fade out at the top. |
radius | number | 16 | Corner radius of the window in pixels. |
typingSpeed | number | 26 | Characters per second when typing commands. |
variance | number | 0.5 | How human the typing feels, from 0 (perfectly even) to 1 (hesitant). |
lineDelay | number | 70 | Milliseconds between output lines. A step can set its own delay. |
startDelay | number | 700 | Milliseconds of idle prompt before the session starts. |
hold | number | 3200 | Milliseconds the finished session stays on screen before it starts over. |
loop | boolean | true | Starts the session over when it ends. |
autoplay | boolean | true | Plays when the terminal scrolls into view and pauses while it is off screen. |
cursor | "block" | "bar" | "underline" | "block" | Shape of the caret. |
copyable | boolean | true | Shows a copy button beside each finished command on hover, and always on touch devices. |
interactive | boolean | true | Clicking or pressing Enter finishes the current step, and starts the session over once it has ended. |
onComplete | () => void | — | Called each time the session reaches its end. |
ref | { play, pause, restart, skip } | — | Controls playback, for example to start the session from your own button. |
className | string | — | Classes for the window. |
style | CSSProperties | — | Inline styles for the window. |
scriptTerminalStep[]The session to play. Steps are { type: "command", text, directory? }, { type: "output", lines, delay? }, { type: "spinner", text, duration?, done?, status? }, { type: "progress", text, duration?, done? }, { type: "pause", duration? } and { type: "clear" }. Text can colour parts with [success]…[/], [error]…[/], [warning]…[/], [info]…[/], [accent]…[/], [muted]…[/], [dim]…[/] and [bold]…[/].
project setuptitlestringText in the title bar. An empty string hides it.
"my-app — zsh"promptstringThe prompt symbol before each command.
"❯"directorystringDirectory shown before the prompt. A command can set its own with directory.
"~"chrome"window" | "minimal" | "none"Window adds the three dots and a title, minimal keeps only the title, none removes the title bar.
"window"frame"solid" | "inset"Solid draws one surface. Inset puts the title bar on a tinted frame and sets the session in its own rounded panel, with corners concentric to the frame.
"inset"dots"mono" | "color"Quiet grey window dots, or the classic red, yellow and green.
"mono"theme"auto" | "light" | "dark"Auto picks a light or dark window from the colour behind it, so it follows your site theme.
"auto"accentColorstringColour of the prompt, spinners, progress bars and [accent] text.
theme violetwindowColorstringBackground of the window.
from themetextColorstringMain text colour.
from themefontFamilystringFont of the session. Uses your --font-mono variable when it exists.
system monospacefontSizenumberFont size in pixels.
13lineHeightnumberLine height as a multiple of the font size.
1.7heightnumber | stringHeight of the window. Older lines scroll up and fade out at the top.
360radiusnumberCorner radius of the window in pixels.
16typingSpeednumberCharacters per second when typing commands.
26variancenumberHow human the typing feels, from 0 (perfectly even) to 1 (hesitant).
0.5lineDelaynumberMilliseconds between output lines. A step can set its own delay.
70startDelaynumberMilliseconds of idle prompt before the session starts.
700holdnumberMilliseconds the finished session stays on screen before it starts over.
3200loopbooleanStarts the session over when it ends.
trueautoplaybooleanPlays when the terminal scrolls into view and pauses while it is off screen.
truecursor"block" | "bar" | "underline"Shape of the caret.
"block"copyablebooleanShows a copy button beside each finished command on hover, and always on touch devices.
trueinteractivebooleanClicking or pressing Enter finishes the current step, and starts the session over once it has ended.
trueonComplete() => voidCalled each time the session reaches its end.
—ref{ play, pause, restart, skip }Controls playback, for example to start the session from your own button.
—classNamestringClasses for the window.
—styleCSSPropertiesInline styles for the window.
—