Overview

Lightweight indeterminate progress.

Import

import { ProgressDots } from 'nikcli-tui';

Usage

new ProgressDots({ parent: screen });

Live Preview

Run Locally

npm run tsx:core-gallery

Props

  • text?: string — Base text prefix.
  • intervalMs?: number — Animation interval (default 300ms).
  • dots?: string[] — Dot frames; default [”, ’.’, ’..’, ’…’].
  • dotCount?: number — Use only first N frames.

Methods

  • start(text?, intervalMs?), stop(), pause(), resume(), reset().
  • setText(text), setDots(frames), setDotCount(n), setInterval(ms).
  • getCurrentDotIndex(), getCurrentDots(), isRunning().

Installation

npm i nikcli-tui

Import

import { ProgressDots } from 'nikcli-tui';

Quick Start

new ProgressDots({ parent: screen, top: 1, left: 2, text: 'Loading' });

Production Examples

const dots = new ProgressDots({ parent: screen, top: 1, left: 2, text: 'AI' });
dots.setDots(['','·','··','···']);

Best Practices

  • Usa dots per operazioni < 3s; per durate maggiori preferisci ProgressBar.