API Reference

cli-table3

A terminal table renderer with Unicode borders, column alignment, and customizable styles.

Official Documentation ↗
CompatibilityThis documentation covers version v0.6. Check the official docs for the latest API surface.

Installation

npmnpm install cli-table3

Methods

cli-table3 builds tables from a header and rows and renders them with borders and word wrapping.

Key Features

  • Unicode and ASCII border styles
  • Column alignment and col widths
  • Automatic word wrapping

Usage Notes

Pin a version and check the official docs for the API surface you depend on before upgrading.

API reference evidence

Fetched from official sources on 2026-11-08T19:26:00+08:00 via WebFetch https://raw.githubusercontent.com/cli-table/cli-table3/master/index.d.ts;WebFetch https://raw.githubusercontent.com/cli-table/cli-table3/master/README.md.

FAQ

How do I set column widths?
Pass colWidths as an array; unset entries auto-size. Explicit widths combined with wrapping keep wide content readable.
Can I use ASCII borders?
Yes. Pass style: { border: ["+", "-"] } or the compact preset to get ASCII output for terminals without Unicode.
How do I color cells?
Apply color functions from a library such as picocolors to cell strings before pushing them, since cli-table3 does not apply colors itself.