Logo
Noddev
ShowcaseDocsBlog
Go to Docs

Welcome

IntroductionEcosystem Overview

Omni (OSINT Platform)

OverviewCore ConceptsSteganographySocial Recon

ApiShield (Security)

Getting StartedRate LimitingThreat Models

Terminal-RichJS (CLI)

IntroductionInstallationComponentsLayouts

Ready to secure your next project?

GitHub Profile

© 2026 NODDEV. All rights reserved.

GitHubTwitterWhatsApp

Layouts, Themes & Traceback

Box styles, syntax themes, and error traceback handling.

Box Styles

RichJS supports multiple box drawing styles for panels and tables.

Available Styles

StyleCornersDescription
rounded╭╮╰╯Rounded corners (default)
single / square┌┐└┘Single line, square corners
double╔╗╚╝Double lines
heavy / bold┏┓┗┛Heavy/bold lines
ascii++++ASCII-safe characters
minimal(none)No visible borders
simple────Horizontal lines only
markdown|---Markdown table style

Usage

typescript
import { Panel, Table, getBox, listBoxStyles } from "terminal-richjs";
 
// Use in Panel
new Panel("Content", { box: "rounded" });
 
// Use in Table
new Table({ box: "double" });
 
// Get box characters directly
const box = getBox("heavy");
console.log(box.topLeft); // ┏
 
// List all available styles
const styles = listBoxStyles();

Themes

Syntax Themes

typescript
import {
  getTheme,
  MONOKAI,
  DRACULA,
  GITHUB_LIGHT,
  ONE_DARK,
} from "terminal-richjs";
 
// Get theme by name
const theme = getTheme("monokai");
 
// Access theme directly
const { styles, baseStyle, lineNumberStyle } = MONOKAI;

Creating Custom Themes

typescript
import { type SyntaxTheme, Style } from "terminal-richjs";
 
const myTheme: SyntaxTheme = {
  name: "my-theme",
  baseStyle: Style.parse("#f8f8f2"),
  lineNumberStyle: Style.parse("#6e7681 dim"),
  styles: {
    keyword: Style.parse("#ff79c6 bold"),
    string: Style.parse("#f1fa8c"),
    comment: Style.parse("#6272a4 italic"),
    function: Style.parse("#50fa7b"),
    number: Style.parse("#bd93f9"),
  },
};

Traceback

Beautiful error tracebacks with syntax-highlighted code snippets.

typescript
import { Traceback, installTracebackHandler } from "terminal-richjs";
 
// Option 1: Install global handler
installTracebackHandler({
  theme: "monokai",
  extraLines: 3,
  suppressInternal: true,
  maxFrames: 100,
});
 
// Option 2: Manual rendering
try {
  throw new Error("Something went wrong");
} catch (error) {
  const traceback = new Traceback(error as Error, {
    theme: "dracula",
    extraLines: 2,
  });
  new Console().print(traceback);
}

Traceback Options

OptionTypeDefaultDescription
showLocalsbooleanfalseShow local variables (not yet implemented)
extraLinesnumber3Context lines around error
themestring'monokai'Syntax highlighting theme
suppressInternalbooleantrueHide node_modules and internal frames
maxFramesnumber100Maximum frames to show

License

MIT

PreviousComponents
Was this helpful?

On This Page

Box StylesAvailable StylesUsageThemesSyntax ThemesCreating Custom ThemesTracebackTraceback OptionsLicense