# Terminal

A command prompt on dark glass. It is a display, not a shell: it prints what the page gives it, line by line, and keeps a scrollback to read back through. A bar along the top names it and carries one lamp, white while it waits and amber while lines are still arriving. Each line has a mark in its margin that says what it is (a command, a success, a warning or a failure), so a kind is never only a colour, and at the foot a block cursor waits at a prompt that does nothing. Under reduced motion every line arrives whole.

Kit part · With the Kit · https://tactileui.dev/parts/terminal

> The code and styling for this part come with the Tactile UI Kit, which is in the Founder Pass. Sign in if you have it. Sign in: https://tactileui.dev/auth/sign-in The price: https://tactileui.dev/pricing

## Anatomy

Display glass with a scrolling screen of mono type. Each line is a two-column grid of mark and text; arrival is a clip-path wipe in whole steps with a delay that queues one line after another, set from a number of characters. The element is about ninety lines, most of it keeping the scrollback to its cap and the lamp amber until the queue is empty.

## Variants

- Every kind of line
- A failed run
- Empty · waiting at the prompt
- A long line wraps
- A taller screen

## States

- Command
- Output
- Success
- Warning
- Failure

## Props and options

| Name | Kind | Description |
| - | - | - |
| label · prompt · max · height | attribute | The terminal’s name (the log’s accessible name), the text after the prompt’s mark, how many lines it keeps, and the screen’s height. |
| clear() | method | Empties the scrollback. The prompt stays. |
| lines · screen | property | How many lines it holds, and the log element. |
| terminalKind() · terminalLineHTML() · terminalDrop() · terminalTiming() · terminalHTML() | function | The kind a name means, one line’s markup, how many old lines to drop, how long a line takes to print and the whole terminal’s markup. |

## Usage notes

Press Run the build: the command is typed after the prompt and the lines follow, with the lamp amber while they arrive. Tab to the screen and use the arrow keys to scroll.

## Accessibility

- It is a stop of its own, so the keyboard can scroll it.
- A kind is never only a colour.
- The printing is a wipe over text that is already in the page, so a screen reader is not fed one letter at a time. Under reduced motion there is no wipe and no blinking: every line arrives whole and the cursor holds still.
- It follows the bottom only while you are at the bottom, so a line arriving never drags you away from what you scrolled up to read.
- It is a display: no input, no shell, nothing runs. The prompt and its cursor are hidden from a screen reader so they are not mistaken for a field.

## Related parts

- [Glass](https://tactileui.dev/parts/glass): Dark display glass for plots and live readouts, whatever the finish around it. Everything printed inside it is lit.
- [Code block](https://tactileui.dev/parts/code-block): Code on display glass. A bar along the top holds the file name on a tab, with a lit edge under it, and the copy key at the far end. Under it the lines run, each with its number engraved in a gutter that stays where it is when a long line scrolls sideways. The numbers are drawn by the stylesheet, so they are never selected, never copied and never read aloud. Highlighting is optional and small: a few strengths of the display’s own light, told apart by weight and italic, never a colour of its own.
- [Chart recorder](https://tactileui.dev/parts/recorder): A strip-chart recorder: gridded paper advancing under a pen that rides a rail, drawing the live value as the paper moves and printing the time in the margin. For p95 latency, tokens per second, grid frequency, a cold room’s log.
