Skip to content

LogLines ​

Log viewer with per-level coloring, terminal style.

LogLines

Design lines ​

[03:41:49] Starting dev server on port 5173
[03:41:49]⚠Deprecated API usage in auth module
[03:41:49]✕Failed to connect to database
[03:41:49]·Cache miss for key session:42
[03:41:49] Server ready - accepting connections
vue
1<Tabs defaultValue="tuix">2  <TabsList>3    <Tab value="tuix">TUIX</Tab>45    <Tab value="rubik">Rubik</Tab>6  </TabsList>78  <TabPanel value="tuix">9    <LogLines10      :lines="[11        { text: 'Starting dev server on port 5173', level: 'info' },12        { text: 'Deprecated API usage in auth module', level: 'warn' },13        { text: 'Failed to connect to database', level: 'error' },14        { text: 'Cache miss for key session:42', level: 'debug' },15        { text: 'Server ready - accepting connections', level: 'info' },16      ]"17      timestamps18      design="tuix"19    />20  </TabPanel>2122  <TabPanel value="rubik">23    <LogLines24      :lines="[25        { text: 'Starting dev server on port 5173', level: 'info' },26        { text: 'Deprecated API usage in auth module', level: 'warn' },27        { text: 'Failed to connect to database', level: 'error' },28        { text: 'Cache miss for key session:42', level: 'debug' },29        { text: 'Server ready - accepting connections', level: 'info' },30      ]"31      timestamps32      design="rubik"33    />34  </TabPanel>35</Tabs>

Demo ​

Basic (lines) ​

Renders a list of log lines from the lines prop.

INFO Starting dev server...
⚠WARN Deprecated API in v3
✕ERROR Failed to connect
·DEBUG Cache miss for key
INFO Server ready on port 5173
vue
1<LogLines2  :lines="[3    { text: 'INFO  Starting dev server...', level: 'info' },4    { text: 'WARN  Deprecated API in v3', level: 'warn' },5    { text: 'ERROR Failed to connect', level: 'error' },6    { text: 'DEBUG Cache miss for key', level: 'debug' },7    { text: 'INFO  Server ready on port 5173', level: 'info' },8  ]"9/>

Max (max) ​

Keeps only the most recent lines shown when max is set.

Line 3
Line 4
Line 5
vue
1<LogLines2  :lines="[3    { text: 'Line 1', level: 'info' },4    { text: 'Line 2', level: 'info' },5    { text: 'Line 3', level: 'info' },6    { text: 'Line 4', level: 'info' },7    { text: 'Line 5', level: 'info' },8  ]"9  :max="3"10/>

Timestamps (timestamps) ​

Prefixes each line with [HH:MM:SS] when timestamps is set.

[03:41:49] Server started
[03:41:49]✕Connection lost
vue
1<LogLines2  :lines="[3    { text: 'Server started', level: 'info' },4    { text: 'Connection lost', level: 'error' },5  ]"6  timestamps7/>

Color (color) ​

Applies the color prop to the component border.

Primary log
Success log
vue
1<LogLines2  :lines="[3    { text: 'Primary log', level: 'info' },4    { text: 'Success log', level: 'info' },5  ]"6  color="success"7/>

Props ​

lines ​

Array of log lines.

TypeDefaultRequired
Array<{text: string, level?: 'info' | 'warn' | 'error' | 'debug'}>[]❌
vue
1<LogLines :lines="[2  { text: 'Starting...', level: 'info' },3  { text: 'Error!', level: 'error' },4]" />

Each line has this shape:

FieldTypeRequiredDescription
textstring✅Line content
level'info' | 'warn' | 'error' | 'debug'❌Log level

max ​

Maximum number of visible lines (the most recent). Extra lines are discarded.

TypeDefaultRequired
number100❌

timestamps ​

Adds a [HH:MM:SS] prefix to each line.

TypeDefaultRequired
booleanfalse❌

color ​

Color of the component (applied to the border).

TypeDefaultRequired
'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark''primary'❌

design ​

Design line (or inherit from data-design).

TypeDefaultRequired
'tuix' | 'rubik'— (inherits from data-design)❌

CSS Custom Properties ​

TokenDefaultDescription
--font-mono"JetBrains Mono", ui-monospace, monospaceMonospace font stack for code-like content (key labels, log lines, chips).
--bgfrom theme (--ctp-latte-base / --ctp-mocha-base)Base background of the surface.
--bg-altfrom theme (--ctp-latte-mantle / --ctp-mocha-mantle)Alternate background (the next layer down from the base).
--borderfrom theme (--ctp-latte-surface0 / --ctp-mocha-surface0)Outline and divider color for surfaces.
--text-mutedfrom theme (--ctp-latte-subtext1 / --ctp-mocha-subtext1)Secondary text for hints, annotations and disabled state.
--color-primaryfrom theme (--ctp-latte-mauve / --ctp-mocha-mauve)Primary semantic color (mauve in Catppuccin).
--color-warningfrom theme (--ctp-latte-yellow / --ctp-mocha-yellow)Warning semantic color (yellow in Catppuccin).
--color-dangerfrom theme (--ctp-latte-red / --ctp-mocha-red)Danger semantic color (red in Catppuccin).

Ver Theming para la convención completa.