Terminal session
A CLI session that types commands in and fades output lines up as each step completes.
API reference
Components
<TerminalSession />
Height-stable typing terminal body with an sr-only spoken transcript.
lines
The session to play, top to bottom.
typingSpeedMs?
Base milliseconds per keystroke for command lines. Defaults to 55.
startDelayMs?
Milliseconds before the first line starts typing. Defaults to 400.
outputDelayMs?
Milliseconds an output line rests after fading in. Defaults to 520.
label?
Lead-in for the sr-only spoken transcript. Defaults to "Terminal session".
className?
Merged onto the scrolling body wrapper.
Hooks
useTerminalSession
Headless session controller that reveals one line at a time.
useTerminalSession(count: number, options: UseTerminalSessionOptions): TerminalSessionStateReturns
active
Index of the line currently being revealed.
advance
Fire when the active line finishes to schedule the next one.
done
true once every line has been revealed.
Featured in
See the terminal session composed into full sections.
