Skip to content
Design System
GitHub

Robot and system logs in a virtual list smooth at 100,000 lines: follows the newest, keeps maxLines, filters by level and source, searches, wraps, opens a line, copies, and batches fast appends.

API reference

Generated from the types. Every part also takes className.

LogLevelLabel

levelrequired
"error" | "info" | "warn" | "debug" | "fatal"
word
string

LogViewer

lines
readonly LogLine[]Lines, oldest first. An array that only grows appends; any other new array replaces what is shown.
buffer
LogBufferA buffer the app appends to (createLogBuffer), instead of lines. Its own maxLines applies.
ref
((instance: LogViewerHandle | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<LogViewerHandle | null>append, clear and jumpToLatest, for a stream that should not go through React state.
maxLines
number = 10_000The most lines kept; the oldest are dropped. Default 10,000. Up to about 200,000 stay smooth.
defaultLevels
readonly ("error" | "info" | "warn" | "debug" | "fatal")[] = logLevelsThe levels shown at first. Default all.
defaultSources
readonly string[] = []The sources shown at first. Default all.
defaultQuery
string = ""Search text at first.
defaultWrap
boolean = falseWrap long messages instead of cutting them at the edge.
defaultTimeMode
"absolute" | "relative" = "absolute"Clock time (default) or time ago.
defaultExpanded
readonly (string | number)[]Lines (by id) open at first.
now
number"Now" for time ago, in ms since the epoch. Without it the viewer reads the clock every second while time ago is on.
locale
stringFormats times, and counts.
timeZone
stringThe time zone times are shown in. Default the browser's.
announce
false | "all" | "errors" = "errors"Announce new lines to screen readers, at most every 5 s: "errors" (default) only when errors or fatal lines arrived, "all" for every batch, false never.
height
string | number = 480The viewer's height (it scrolls inside). Default 480.
labels
Partial<LogViewerLabels>