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

    Interface ProgressBarData

    Stateful data accepted by the Blessed progressBar adapter.

    interface ProgressBarData {
        capabilities?: Pick<TerminalCapabilities, "colorLevel">;
        backgroundTone?: keyof ThemeColors;
        borderTone?: keyof ThemeColors;
        theme?: Theme;
        tone?: keyof ThemeColors;
        characters?: ProgressBarCharacters;
        formatValue?: (context: ProgressBarValueContext) => string;
        label?: string;
        max?: number;
        min?: number;
        value: number;
        width: 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'

    Characters used to render filled and empty cells.

    Each character should occupy one terminal cell. Multi-cell or combining characters can make the visible track wider than width.

    { filled: '█', empty: '░' }

    formatValue?: (context: ProgressBarValueContext) => string

    Formats the value text appended after the track.

    The callback receives the clamped numeric value and its rounded percentage. Returning an empty string leaves the trailing separator in place; callers that need a track-only representation should account for that when composing output.

    ({ percentage }) => ${percentage}%``

    label?: string

    Optional text rendered before the track.

    Dynamic values must be escaped by the caller if the returned string will later be inserted into a Blessed element with tags enabled. The bundled Blessed adapter disables tags.

    max?: number

    Upper bound of the numeric range.

    Must be finite and greater than min.

    100

    min?: number

    Lower bound of the numeric range.

    Must be finite and lower than max.

    0

    value: number

    Current numeric value.

    The value must be finite. Values below min or above max are clamped before the percentage and formatted value are calculated.

    width: number

    Number of characters reserved for the progress track.

    This excludes the optional label, spaces, and formatted value. It must be a positive integer.