Calm motion: animations on this site only fade, with no movement
Terminal
The output of a shell with a prompt, a history of commands, and colors for errors
Shows a console in a cloud panel or a tutorial, or the log of a build. For a long log with levels and a filter, use the log viewer.
Basic
Welcome to the studio server. Type help to see the commands.
linesis the list of lines. Each line has atextand akind:infor a command,errfor an error, orout(the default).- A command shows after the
prompt(default$). An error has a bar and the danger color, and screen readers hear "Error:" before it. - Enter emits
runwith the command. You run it and add the lines. The terminal does not run anything itself. - The Up and Down arrow keys walk through the commands in
lines. - The screen is a log, so screen readers hear new lines. It scrolls to the end when lines come in.
- A click on the terminal moves the focus to the input, except when you select text.
readonlyremoves the input, for output only.titleadds a bar on top.- Change the words with
labelsor a label pack. The API table lists the keys.
Usage
ts
import { BlessTerminal } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
lines* | BlessTerminalLine[] | — | |
prompt | string | "$" | |
title | string | — | |
readonly | boolean | — | without input, the terminal only shows output, for example a build log |
labels | Partial<{ output: string; command: string; error: string; }> | — |
Events
| Name | Payload | Description |
|---|---|---|
run | [command: string] |