Skip to content

ProgressBar

extends Element

ProgressBar: progress 0-100, fills in any direction, optional % text.

Types

ProgressBarDirection

lua
ProgressBarDirection = "right"|"left"|"up"|"down"

Properties

PropertyTypeDefaultDescription
progressnumber0Fill level 0-100, clamped automatically
barColornumbercolors.limecolor of the filled part
backgroundnumber|falsecolors.grayBackground color (false = transparent)
widthnumber16Width in terminal cells
directionProgressBarDirection"right"right, left, up or down
showPercentagebooleanfalsecentered "42%" text

Methods

ProgressBar:render(buf)

Renders the bar; the fill grows in the configured direction.

  • buf (Render) The render buffer

Last updated:

Released under the MIT License.