ProgressBarComponent
Official
A component that displays a progress bar.
Import:
import { ProgressBarComponent } from 'obsidian';Signature:
export class ProgressBarComponent extends ValueComponent<number>Extends: ValueComponent<number>
Constructor
new ProgressBarComponent(containerEl: HTMLElement)Constructor.
To get the constructor instance, use getProgressBarComponentConstructor from obsidian-typings/implementations.
Properties
| Property | Type | Description | |
|---|---|---|---|
| lineEl | HTMLDivElement | Access the "line" element which is a child of the progressBar element. | |
| progressBar | HTMLDivElement | Access the "bar" element. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| getValue() | number | Get the current value of the progress bar (0-100). | |
| registerOptionListener(listeners, key) | this | Register an option listener. (Inherited from ValueComponent) | |
| setValue(value) | this | Set the current value of the progress bar. | |
| setValue(value) | this | Set the value of the component. (Inherited from ValueComponent) | |
| setVisibility(visible) | this | Shows/hides the component. |
Links to this page: