Skip to main content

Progress Bar

Displays a progress bar to the user.

Examples

Default behavior

This is what happens when there is no parameter passed

from abstra.forms import display_progress

display_progress()

Custom fields

You can customize the current and total number of steps. Also the message of each step

from time import sleep

for i in range(10):
display_progress(i, 10, text="Computing values")

sleep(1) # Do some computation

Parameters

NameDescriptionType
currentThe progress being made. Defaults to 50.float
totalTotal progress. Defaults to 100.float
textThe text displayed with this progress step. Defaults to "".str
end_programWhether the program should end after the widget is shown. Defaults to False.bool
full_widthWhether the input should use full screen width. Defaults to False.bool
button_textWhat text to display on the button when the widget is not part of a Page. Defaults to 'Next'.str