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

    Interface StatData

    Stateful data accepted by the Blessed stat adapter.

    interface StatData {
        capabilities?: Pick<TerminalCapabilities, "colorLevel">;
        backgroundTone?: keyof ThemeColors;
        borderTone?: keyof ThemeColors;
        theme?: Theme;
        tone?: keyof ThemeColors;
        description?: string;
        label: string;
        layout?: StatLayout;
        trend?: StatTrend;
        trendCharacters?: StatTrendCharacters;
        unit?: string;
        unitSeparator?: string;
        value: string | number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    capabilities?: Pick<TerminalCapabilities, "colorLevel">

    Explicit color capability used for deterministic rendering.

    backgroundTone?: keyof ThemeColors

    Semantic background token.

    'background'

    borderTone?: keyof ThemeColors

    Semantic border token.

    'border'

    theme?: Theme

    Semantic terminal theme.

    tone?: keyof ThemeColors

    Semantic foreground token.

    'foreground'

    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.