blessed-components - v1.20.0
    Preparing search index...

    Interface RenderStatOptions

    Options accepted by renderStat.

    A Stat presents one primary metric. It can add a unit, directional trend, and description without embedding ANSI sequences or Blessed tags.

    interface RenderStatOptions {
        description?: string;
        label: string;
        layout?: StatLayout;
        trend?: StatTrend;
        trendCharacters?: StatTrendCharacters;
        unit?: string;
        unitSeparator?: string;
        value: string | number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    description?: string

    Optional supporting text rendered after the primary metric.

    label: string

    Human-readable label explaining the metric.

    layout?: StatLayout

    Arrangement of label and value.

    • stacked renders the label above the value.
    • inline renders the label and value on one line.

    'stacked'

    trend?: StatTrend

    Optional directional change rendered beside the primary value.

    trendCharacters?: StatTrendCharacters

    Glyphs used for up, down, and flat trends.

    Every glyph must be non-empty. Prefer single-cell characters.

    { up: '↑', down: '↓', flat: '→' }

    unit?: string

    Optional unit appended to the primary value.

    Use RenderStatOptions.unitSeparator when a space or custom separator is required.

    unitSeparator?: string

    Text inserted between the primary value and unit.

    The empty default supports attached units such as %. Use ' ' for detached units such as GB.

    ''

    value: string | number

    Primary metric value.

    Numeric values must be finite.