LogViewer
API reference and demos for LogViewer.
Import
Section titled “Import”import { LogViewer } from "@flanksource/clicky-ui/data";The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
bgClass |
string |
— | Background utility class for the log container. |
borderClass |
string |
— | Border utility class for the log container. |
className |
string |
— | Classes applied to the root wrapper. |
collapsedLines |
number |
5 |
Number of lines shown before the viewer is expanded. Ignored when `maxHeight` is set. |
logs* |
string |
— | Raw log text separated by newlines; ANSI SGR escapes are styled. |
maxExpandedVh |
number |
70 |
Maximum expanded height in viewport-height units. |
maxHeight |
string |
— | Collapsed height as a CSS length (e.g. `25cqh` for a quarter of the enclosing size container). Every line is rendered and the block scrolls, instead of cutting the text at `collapsedLines`. |
variant |
enum |
muted |
`terminal` renders light text on black, like the console it came from. |