Components/Progress bar

Progress bar

A determinate progress bar. Set fraction between 0 and 1; it renders a / bar of the given width with a trailing percentage. Pair it with Spring for buttery-smooth easing between values.

Install the package

Every component ships in the single dart_tui package.

$dart pub add dart_tui
progress bar · dart_tui
Progress bar demo

ProgressModel

PropertyTypeDescription
fractiondoubleProgress from 0.0 to 1.0 (asserted in range).
widthintBar width in columns. Defaults to 40.
labelStringOptional label rendered before the bar.
stylesProgressStylesStyling for filled cells, empty cells, label and percentage.

Related