demo D113
Terminal
A phosphor console: one hue, monospaced, status by brightness
theme: 'terminal'
The configuration
import * as ng from '@angular/core';
import { Component } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { createGrid } from '@toclocoinc/lattice-grid';
import '@toclocoinc/lattice-grid/css';
import createLatticeGrid from '@toclocoinc/lattice-grid/modules/angular';
const { LatticeGridComponent } = createLatticeGrid({ ng, createGrid });
const columns = [
{ field: 'service', title: 'Service', layout: { pin: 'start', width: 140 } },
{ field: 'team', title: 'Team', filter: { type: 'set' } },
{ field: 'owner', title: 'Owner', filter: { type: 'set' } },
{ field: 'tier', title: 'Tier', cell: { decoration: 'pill', variant: { map: { gold: 'warning', silver: 'neutral', bronze: 'info' } } } },
{ field: 'state', title: 'State', cell: { decoration: 'dot', variant: { map: { healthy: 'success', degraded: 'warning', failing: 'danger', unknown: 'neutral' } } } },
{ field: 'region', title: 'Region', filter: { type: 'set' } },
{ field: 'active', title: 'Active', type: 'boolean' },
{ field: 'deprecated', title: 'Deprecated', type: 'boolean' },
{ field: 'version', title: 'Version', layout: { width: 100 } },
];
const rows = [/* 5,000 service records */];
@Component({
selector: 'app-root',
standalone: true,
imports: [LatticeGridComponent],
template: '<lattice-grid [config]="grid" style="display:block;height:540px"></lattice-grid>',
})
export class AppComponent {
grid = {
rowKey: 'id',
selection: 'multiple',
theme: 'terminal',
columns: columns,
rows: rows,
};
}
bootstrapApplication(AppComponent);
A monochrome terminal theme for a JavaScript data grid
The terminal theme strips colour down to a single hue on a dark background, rendering text, borders and status indicators as shades of one phosphor green (or amber, or white, depending on the palette chosen) rather than a mixed colour scale. Reach for it when a Lattice Grid instance sits inside a console-style tool, a log viewer, or any interface built to evoke a command-line session, where a conventional light-and-shade UI theme would clash with the surrounding chrome. Row state, sort direction and validation errors are still legible: instead of red and green, the theme encodes them as brightness steps, so a flagged row sits at full intensity while a muted or disabled one recedes toward the background. Set theme: 'terminal' to switch a grid over; the option takes effect immediately and does not require re-mounting the grid or reloading its data.
Because every element draws from one hue, the theme keeps contrast ratios stable across the interface: headers, focus rings and hover states each get their own brightness step, so the relationships between them hold even when a display’s saturation changes. Fonts render monospaced by default, matching a terminal-style layout and keeping numeric columns aligned without extra width padding. Switching themes is a style change only; row data, sort order and column widths carry over unaffected.
How do I make a JavaScript data grid look like a terminal?
Set the theme option to 'terminal' when creating the grid, or apply it later with the same property. The theme swaps colours and fonts for a single-hue, monospaced palette while leaving row data, sorting and column layout untouched, so it can be toggled alongside other themes without rebuilding the grid.