Progress Indicator
Description
The ProgressIndicator is a UI component used to visually represent the completion status of an operation when the total units of work are known. It displays a horizontal progress bar that updates based on a percentage value. If the progress cannot be determined, the component can be set to an "indeterminate" state, where continuous animation is shown instead of a finite progress percentage. Use this component to provide users with a visual indication of progress in long-running operations.
Usage
The component is instantiated using the fluent API provided by the Tesserae UI static class. You can create a new ProgressIndicator and configure it to show either a determinate progress value (by setting a percentage) or an indeterminate state.
Below is an example of how to instantiate and update the progress indicator:
API reference
public class ProgressIndicator : IComponent, IHasForegroundColorA horizontal progress bar with optional label and either determinate or indeterminate state.
- Namespace
- Tesserae
- Implements
- IComponent, IHasForegroundColor
Constructors
| Name | Description |
|---|---|
| ProgressIndicator | Initializes a new instance of this class. |
Properties
| Name | Description |
|---|---|
| Foreground | Gets or sets the CSS color (foreground) of the component. |
Methods
| Name | Description |
|---|---|
| Progress | Configures the component to progress. |
| Indeterminated | Configures the component to indeterminated. |
| AI | Paints the bar with the AI gradient - a model working through something, determinate or not. |
| Render | Renders the component's root HTML element. |
| Overload | |
|---|---|
| Progress(int, int) | Configures the component to progress. |
| Progress(float) | Configures the component to progress. |
public ProgressIndicator Indeterminated()Configures the component to indeterminated.
public ProgressIndicator AI(bool value = true, bool strongEffect = false)Paints the bar with the AI gradient - a model working through something, determinate or not.
Parameters
- strongEffect
- Asks for the louder form of the AI styling. A custom theme that tones the AI look down (e.g. Tesserae.Themes.Curiosity) brings more of it back for this element; the default theme draws both forms the same today. Sets the
tss-ai-strongclass.
Samples
Displaying Various Progress States
This sample shows how to create and render multiple instances of the ProgressIndicator component in various states including determinate progress and an indeterminate state.