日本語

Code & changes / Commands & output

Terminal

Keep a command and its output together, with a prompt that stays out of copied text.

Basic usage

Preview

npm run check

All 150 pairs meet their target.

exit 0 — checks passed

HTML
<div class="terminal">
  <p class="terminal-command">npm run check</p>
  <pre class="terminal-output">All 150 pairs meet their target.</pre>
  <p class="terminal-exit tone-ok">exit 0 — checks passed</p>
</div>

Classes & attributes

Class / attributePurpose
.terminalThe command session.
.terminal-commandThe prompt is drawn by CSS.
.terminal-output / .terminal-errorNormal output and error output.
.terminal-exitThe exit code, with an explanation of the outcome.

Usage notes

Do not put a $ prompt in the command text. It should not be copied into the shell.

Examples follow your system color scheme. Use ◐ in the header to try automatic, light, and dark themes.