Overview

Show progress while tasks run.

Import

import { Spinner } from 'nikcli-tui';

Usage

new Spinner({ parent: screen, text: 'Loading...' });

Live Preview

Run Locally

npm run tsx:core-gallery

Props

  • text?: string — Optional label.
  • intervalMs?: number — Frame interval (default 80ms).

Methods

  • start(text?, intervalMs?), stop().

Installation

npm i nikcli-tui

Import

import { Spinner } from 'nikcli-tui';

Quick Start

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

Production Examples

const sp = new Spinner({ parent: screen, top: 1, left: 2 });
sp.start('Sync', 150);

Best Practices

  • Mostra sempre un contesto (StatusBar/Label) per evitare ambiguità.