ProgressLinear
Progress bar component showing a percentage, indeterminate or hidden.
@solara.component
def ProgressLinear(
value: Union[bool, float] = True,
color="primary",
style: Union[str, Dict[str, str], None] = None,
classes: List[str] = [],
):
...
- When
value
isTrue
, the progress bar will be indeterminate. - When
value
isFalse
, the progress bar will be hidden, but still take up space. This can be used to avoid the page to jump when the progress bar is shown and hidden. - When
value
is a number between 0 and 100, the progress bar will show the percentage.
Basic example
import solara
@solara.component
def Page():
solara.ProgressLinear(value=30, color="purple")
solara.ProgressLinear(True)
Live output
Arguments
value
: Value of the progress bar. Can be a number between 0 and 100,True
for indeterminate orFalse
to hide.color
: Color of the progress bar.style
: CSS style to add to the progress bar.classes
: List of classes to apply to the progress bar.