@chromakit/core
    Preparing search index...

    Interface TableOptions

    Options for customizing table rendering.

    interface TableOptions {
        align?: ("left" | "center" | "right")[];
        borderColor?: string;
        borderStyle?: "single" | "double" | "dashed";
        cellStyle?: (text: string, row: number, col: number) => string;
        columnWidths?: number[];
        headers?: string[];
        headerStyle?: (text: string) => string;
        padding?: number;
    }
    Index

    Properties

    align?: ("left" | "center" | "right")[]

    Per-column text alignment.

    If omitted or shorter than the column count, unspecified columns default to "left".

    borderColor?: string

    Border color (name or hex) applied to all border glyphs.

    Coloring is done via colorText, which emits ANSI SGR sequences (truecolor: ESC[38;2;r;g;bm) and appends a reset to avoid style bleed. :contentReference[oaicite:0]{index=0}

    borderStyle?: "single" | "double" | "dashed"

    Border style preset.

    "single"

    cellStyle?: (text: string, row: number, col: number) => string

    Style to apply to each rendered cell string.

    Type declaration

      • (text: string, row: number, col: number): string
      • Parameters

        • text: string

          The padded, aligned cell text.

        • row: number

          Row index (0-based, excluding headers).

        • col: number

          Column index (0-based).

        Returns string

        Styled string for the cell.

    This runs after width/alignment; if your style adds ANSI sequences, they do not affect the already computed widths (good for consistent layout). SGR codes don’t consume terminal columns even though they add code units. :contentReference[oaicite:1]{index=1}

    columnWidths?: number[]

    Fixed column widths (auto-calculated if omitted).

    When provided, values override the auto width for the corresponding column index. Falsy values are ignored (auto width remains).

    headers?: string[]

    Optional column headers.

    headerStyle?: (text: string) => string

    Style to apply to headers (e.g., bold).

    Applied after alignment/padding is computed.

    padding?: number

    Spaces left and right inside each cell.

    1