Overview

Visual separator for grouping.

Import

import { Divider } from 'nikcli-tui';

Usage

new Divider({ parent: screen });

Live Preview

Run Locally

npm run tsx:core-gallery

Props

  • orientation?: ‘horizontal’ | ‘vertical’ — Default horizontal.
  • text?: string — Optional centered text.
  • color?: string — Foreground style.
  • style?: ‘solid’ | ‘dashed’ | ‘dotted’ — Visual style (simple simulation).
  • char?: string — Back-compat; custom line character.
  • BaseProps: width/height to control span.

Notes

  • For vertical dividers set height and orientation='vertical'.

Installation

npm i nikcli-tui

Import

import { Divider } from 'nikcli-tui';

Quick Start

new Divider({ parent: screen, top: 2, left: 2, width: 40 });

Production Examples

new Divider({ parent: screen, top: 2, left: 2, width: 40, text: 'Section' });

Best Practices

  • Preferisci Divider orizzontali come separatori discreti; evita l’overuse.