Log Stream
ProNewA tail of logs that follows new lines, stops when you scroll up and counts what you missed, with level switches, a text filter that marks matches, and pause.
Installation
pnpm dlx shadcn@latest add @viewport/log-stream
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| lines* | LogLine[] | — |
| live | booleanNew lines are arriving. The view follows them unless it is paused or scrolled up. | false |
| height | stringThe height of the log, e.g. "20rem". | "20rem" |
| label | stringAccessible name. | "Logs" |
| className | string | — |
Accessibility
- A log region that is not read line by line; the counts are announced instead.
- The level is a word on every line, so errors are not only red.
- Lines wrap; the log is focusable and scrolls from the keyboard.
- The return-to-latest button leaves the tab order while following.