Skip to main content
Module

x/cliffy/table/mod.ts>Column

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
class Column
import { Column } from "https://deno.land/x/cliffy@v1.0.0-rc.3/table/mod.ts";

Column representation.

Can be used to customize a single column.

import { Column, Table } from "./mod.ts";

new Table()
  .body([
    ["Foo", "bar"],
    ["Beep", "Boop"],
  ])
  .column(0, new Column().border())
  .render();

Methods

align(direction: Direction): this

Set column alignment.

border(border?): this

Set column border.

getAlign(): Direction | undefined

Get column alignment.

getBorder(): boolean | undefined

Get column border.

getMaxWidth(): number | undefined

Get max column width.

getMinWidth(): number | undefined

Get min column width.

getPadding(): number | undefined

Get column padding.

maxWidth(width: number): this

Set max column width.

minWidth(width: number): this

Set min column width.

options(options: ColumnOptions): this

Set column options.

padding(padding: number): this

Set column padding.

Static Methods

Create a new cell from column options or an existing column.