or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

code-snippets.mdconsole-tool.mdcore-api.mdelements-inspector.mdindex.mdinfo-display.mdnetwork-monitor.mdresource-manager.mdsettings-manager.mdsource-viewer.mdtool-development.md
tile.json

info-display.mddocs/

Info Display

Information display system for showing system details and custom information entries. The Info tool provides a customizable information panel for displaying system information and custom data entries.

Capabilities

Information Management

Add, retrieve, and manage custom information entries.

/**
 * Add information entry
 * @param name - Information name/label
 * @param val - Value (string or function returning string)
 * @returns Info instance for chaining
 */
add(name: string, val: string | (() => string)): Info;

/**
 * Get information entry or all entries
 * @param name - Entry name (optional)
 * @returns Entry value or array of all entries
 */
get(): InfoItem[];
get(name: string): string;

/**
 * Remove information entry
 * @param name - Entry name to remove  
 * @returns Info instance for chaining
 */
remove(name: string): Info;

/**
 * Clear all information entries
 * @returns Info instance for chaining
 */
clear(): Info;

interface InfoItem {
  name: string;
  val: string;
}

Usage Examples:

const info = eruda.get('info');

// Add static information
info.add('App Version', '1.2.3');
info.add('Environment', 'Production');

// Add dynamic information with functions
info.add('Current Time', () => new Date().toLocaleString());
info.add('Memory Usage', () => {
  return performance.memory ? 
    `${Math.round(performance.memory.usedJSHeapSize / 1024 / 1024)}MB` : 
    'N/A';
});

// Retrieve information
const allInfo = info.get();
const version = info.get('App Version');

// Remove and clear
info.remove('Environment');
info.clear();

Default system information includes browser details, OS information, screen dimensions, and performance metrics.