Overview

Display helpful hints and shortcuts.

Import

import { HelpOverlay } from 'nikcli-tui';

Usage

new HelpOverlay({ parent: screen, content: 'Help overlay' });

Live Preview

Run Locally

npm run tsx:core-gallery

Props

  • content: string — Markdown/text content.
  • title?: string — Window label.
  • width?/height?: dims — Defaults to 80% viewport.
  • onClose?: () => void — Callback on close.
  • BaseProps: overlay fills screen; inner box styled.

Methods

  • setContent(text), setTitle(text), show(), hide(), close().

Keyboard

  • Esc, q: close overlay (when closable).

Installation

npm i nikcli-tui

Import

import { HelpOverlay } from 'nikcli-tui';

Quick Start

const help = new HelpOverlay({ parent: screen, content: 'Press q to quit', title: 'Help' });
help.show();

Production Examples

new HelpOverlay({ parent: screen, content: 'Docs...', title: 'Help', width: '70%', height: '70%' }).show();

Best Practices

  • Rendi il contenuto scrollabile e sintetico; evita muri di testo.