LogLines
Log viewer with per-level coloring, terminal style.
LogLines
Design lines
Starting dev server on port 5173
⚠Deprecated API usage in auth module
✕Failed to connect to database
·Cache miss for key session:42
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.
Server started
✕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.
| Type | Default | Required |
|---|---|---|
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:
| Field | Type | Required | Description |
|---|---|---|---|
text | string | ✅ | Line content |
level | 'info' | 'warn' | 'error' | 'debug' | ❌ | Log level |
max
Maximum number of visible lines (the most recent). Extra lines are discarded.
| Type | Default | Required |
|---|---|---|
number | 100 | ❌ |
timestamps
Adds a [HH:MM:SS] prefix to each line.
| Type | Default | Required |
|---|---|---|
boolean | false | ❌ |
color
Color of the component (applied to the border).
| Type | Default | Required |
|---|---|---|
'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark' | 'primary' | ❌ |
design
Design line (or inherit from data-design).
| Type | Default | Required |
|---|---|---|
'tuix' | 'rubik' | — (inherits from data-design) | ❌ |
CSS Custom Properties
| Token | Default | Description |
|---|---|---|
--font-mono | "JetBrains Mono", ui-monospace, monospace | Monospace font stack for code-like content (key labels, log lines, chips). |
--bg | from theme (--ctp-latte-base / --ctp-mocha-base) | Base background of the surface. |
--bg-alt | from theme (--ctp-latte-mantle / --ctp-mocha-mantle) | Alternate background (the next layer down from the base). |
--border | from theme (--ctp-latte-surface0 / --ctp-mocha-surface0) | Outline and divider color for surfaces. |
--text-muted | from theme (--ctp-latte-subtext1 / --ctp-mocha-subtext1) | Secondary text for hints, annotations and disabled state. |
--color-primary | from theme (--ctp-latte-mauve / --ctp-mocha-mauve) | Primary semantic color (mauve in Catppuccin). |
--color-warning | from theme (--ctp-latte-yellow / --ctp-mocha-yellow) | Warning semantic color (yellow in Catppuccin). |
--color-danger | from theme (--ctp-latte-red / --ctp-mocha-red) | Danger semantic color (red in Catppuccin). |
Ver Theming para la convención completa.